summaryrefslogtreecommitdiff
path: root/debian/patches/libcommon-linux-specific.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/libcommon-linux-specific.patch')
-rw-r--r--debian/patches/libcommon-linux-specific.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/debian/patches/libcommon-linux-specific.patch b/debian/patches/libcommon-linux-specific.patch
new file mode 100644
index 0000000..35f7cbf
--- /dev/null
+++ b/debian/patches/libcommon-linux-specific.patch
@@ -0,0 +1,97 @@
+From: Igor Pashev <pashev.igor@gmail.com>
+Date: Fri, 2 Nov 2012 21:10:05 +0400
+Subject: cpu_set_t is linux specific
+
+---
+ lib/Makemodule.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: util-linux/lib/Makemodule.am
+===================================================================
+--- util-linux.orig/lib/Makemodule.am 2012-11-02 21:20:44.083929864 +0400
++++ util-linux/lib/Makemodule.am 2012-11-02 21:29:18.407698999 +0400
+@@ -5,7 +5,6 @@
+ lib/at.c \
+ lib/blkdev.c \
+ lib/canonicalize.c \
+- lib/cpuset.c \
+ lib/crc32.c \
+ lib/env.c \
+ lib/fileutils.c \
+@@ -20,13 +19,13 @@
+ lib/randutils.c \
+ lib/setproctitle.c \
+ lib/strutils.c \
+- lib/sysfs.c \
+ lib/tt.c \
+ lib/wholedisk.c \
+ lib/xgetpass.c
+
+ if LINUX
+ libcommon_la_SOURCES += \
++ lib/sysfs.c \
+ lib/linux_version.c \
+ lib/loopdev.c
+ endif
+@@ -50,6 +49,7 @@
+
+ if LINUX
+ if HAVE_CPU_SET_T
++libcommon_la_SOURCES += lib/cpuset.c
+ check_PROGRAMS += test_cpuset
+ endif
+ check_PROGRAMS += \
+Index: util-linux/lib/path.c
+===================================================================
+--- util-linux.orig/lib/path.c 2012-11-02 21:19:45.295248488 +0400
++++ util-linux/lib/path.c 2012-11-02 21:26:20.318824314 +0400
+@@ -21,6 +21,8 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
++#include <config.h>
++
+ #include <stdarg.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -28,7 +30,9 @@
+ #include <errno.h>
+
+ #include "all-io.h"
++#if HAVE_CPU_SET_T
+ #include "cpuset.h"
++#endif
+ #include "path.h"
+ #include "nls.h"
+ #include "c.h"
+@@ -151,6 +155,7 @@
+ return access(p, F_OK) == 0;
+ }
+
++#if HAVE_CPU_SET_T
+ static cpu_set_t *
+ path_cpuparse(int maxcpus, int islist, const char *path, va_list ap)
+ {
+@@ -208,6 +213,7 @@
+
+ return set;
+ }
++#endif /* HAVE_CPU_SET_T */
+
+ void
+ path_setprefix(const char *prefix)
+Index: util-linux/include/path.h
+===================================================================
+--- util-linux.orig/include/path.h 2012-11-02 20:15:39.867352056 +0400
++++ util-linux/include/path.h 2012-11-02 21:25:22.660543877 +0400
+@@ -10,8 +10,10 @@
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+ extern int path_exist(const char *path, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
++#if HAVE_CPU_SET_T
+ extern cpu_set_t *path_cpuset(int, const char *path, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+ extern cpu_set_t *path_cpulist(int, const char *path, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
++#endif
+ extern void path_setprefix(const char *);