~ubuntu-branches/ubuntu/utopic/mysql-workbench/utopic

« back to all changes in this revision

Viewing changes to debian/patches/prtcl.patch

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-05-31 12:03:58 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140531120358-cjik5ofkmj0fxsn8
Tags: 6.1.6+dfsg-1
* New upstream release [May 2014].
* Dropped "prtcl.patch".
* "debian/clean": better clean-up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Last-Update: 2014-04-05
2
 
Forwarded: not-needed
3
 
Origin: upstream
4
 
From: Alfredo Kojima <alfredo.kengi.kojima@oracle.com>
5
 
Description: fix FTBFS on non-Linux architectures.
6
 
 
7
 
--- a/CMakeLists.txt
8
 
+++ b/CMakeLists.txt
9
 
@@ -104,8 +104,16 @@
10
 
                endif()
11
 
        endif()
12
 
 endif()
13
 
 
14
 
+if (UNIX)
15
 
+  include (CheckIncludeFiles)
16
 
+  CHECK_INCLUDE_FILES ("sys/prctl.h" HAVE_PRCTL)
17
 
+  if (HAVE_PRCTL)
18
 
+    add_definitions(-DHAVE_PRCTL_H)
19
 
+  endif()
20
 
+endif()
21
 
+
22
 
 include (CheckFunctionExists)
23
 
 check_function_exists (strtol HAVE_STRTOL)
24
 
 check_function_exists (strtoll HAVE_STRTOLL)
25
 
 check_function_exists (strtold HAVE_STRTOLD)
26
 
--- a/library/forms/gtk/src/lf_utilities.cpp
27
 
+++ b/library/forms/gtk/src/lf_utilities.cpp
28
 
@@ -26,9 +26,11 @@
29
 
   #define USE_KEYRING 1
30
 
 #endif
31
 
 
32
 
 #include <glib/gstdio.h>
33
 
+#ifdef HAVE_PRCTL_H
34
 
 #include <sys/prctl.h>
35
 
+#endif
36
 
 
37
 
 // this is broken
38
 
 //#undef USE_KEYRING
39
 
 #include "../lf_mforms.h"
40
 
@@ -803,10 +805,12 @@
41
 
 
42
 
 
43
 
 void UtilitiesImpl::set_thread_name(const std::string &name)
44
 
 {
45
 
+#ifdef HAVE_PRCTL_H 
46
 
   if (!name.empty())
47
 
     prctl(PR_SET_NAME, name.c_str(),0,0,0);
48
 
+#endif
49
 
 }
50
 
 
51
 
 //------------------------------------------------------------------------------
52