summaryrefslogtreecommitdiff
path: root/debian/patches/libcommon-linux-specific.patch
blob: 35f7cbf2a4de7d1ab27a6877aff547bdfae10d5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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 *);