Re: Hurd patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Samuel Thibault, le Wed 09 Jun 2010 00:46:43 +0200, a écrit :
> Here is a patch to fix the build on GNU/Hurd, could you please apply it?

Even better, here is a patch against 1.8rc1 from git.

Samuel

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff --git a/lib/Makefile.am b/lib/Makefile.am
index f34bb92..2a185f3 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,16 +4,20 @@ AM_CPPFLAGS += -DTEST_PROGRAM
 
 noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \
 		  test_strtosize test_tt
+if LINUX
 if HAVE_CPU_SET_T
 noinst_PROGRAMS += test_cpuset
 endif
+endif
 
 test_blkdev_SOURCES = blkdev.c
 test_ismounted_SOURCES = ismounted.c
 test_wholedisk_SOURCES = wholedisk.c
 test_mangle_SOURCES = mangle.c
 test_strtosize_SOURCES = strtosize.c
+if LINUX
 test_cpuset_SOURCES = cpuset.c
+endif
 test_tt_SOURCES = tt.c
 
 if LINUX
diff --git a/lib/ismounted.c b/lib/ismounted.c
index 94fe425..fa7e822 100644
--- a/lib/ismounted.c
+++ b/lib/ismounted.c
@@ -19,6 +19,7 @@
 
 #include "pathnames.h"
 #include "ismounted.h"
+#include "c.h"
 
 #ifdef HAVE_MNTENT_H
 /*
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 0ff9b9b..cc40013 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -66,8 +66,10 @@ static void show_usage(int rc)
 	"  -i | --idle          set policy to SCHED_IDLE\n"
 	"  -o | --other         set policy to SCHED_OTHER\n"
 	"  -r | --rr            set policy to SCHED_RR (default)\n"
+#ifdef SCHED_RESET_ON_FORK
 	"\nScheduling flags:\n"
 	"  -R | --reset-on-fork set SCHED_RESET_ON_FORK for FIFO or RR\n"
+#endif
 	"\nOptions:\n"
 	"  -h | --help          display this help\n"
 	"  -p | --pid           operate on existing given pid\n"
@@ -99,9 +101,11 @@ static void show_rt_info(const char *what, pid_t pid)
 	case SCHED_FIFO:
 		printf("SCHED_FIFO\n");
 		break;
+#ifdef SCHED_RESET_ON_FORK
 	case SCHED_FIFO|SCHED_RESET_ON_FORK:
 		printf("SCHED_FIFO|SCHED_RESET_ON_FORK\n");
 		break;
+#endif
 #ifdef SCHED_IDLE
 	case SCHED_IDLE:
 		printf("SCHED_IDLE\n");
@@ -110,9 +114,11 @@ static void show_rt_info(const char *what, pid_t pid)
 	case SCHED_RR:
 		printf("SCHED_RR\n");
 		break;
+#ifdef SCHED_RESET_ON_FORK
 	case SCHED_RR|SCHED_RESET_ON_FORK:
 		printf("SCHED_RR|SCHED_RESET_ON_FORK\n");
 		break;
+#endif
 #ifdef SCHED_BATCH
 	case SCHED_BATCH:
 		printf("SCHED_BATCH\n");
@@ -199,9 +205,11 @@ int main(int argc, char *argv[])
 		case 'f':
 			policy = SCHED_FIFO;
 			break;
+#ifdef SCHED_RESET_ON_FORK
 		case 'R':
 			policy_flag |= SCHED_RESET_ON_FORK;
 			break;
+#endif
 		case 'i':
 #ifdef SCHED_IDLE
 			policy = SCHED_IDLE;
@@ -249,11 +257,13 @@ int main(int argc, char *argv[])
 	if (errno)
 		err(EXIT_FAILURE, _("failed to parse priority"));
 
+#ifdef SCHED_RESET_ON_FORK
 	/* sanity check */
 	if ((policy_flag & SCHED_RESET_ON_FORK) &&
 	    !(policy == SCHED_FIFO || policy == SCHED_RR))
 		errx(EXIT_FAILURE, _("SCHED_RESET_ON_FORK flag is suppoted for "
 				"SCHED_FIFO and SCHED_RR policies only"));
+#endif
 
 	policy |= policy_flag;
 
diff --git a/shlibs/blkid/src/topology/evms.c b/shlibs/blkid/src/topology/evms.c
index baab16e..574d9f5 100644
--- a/shlibs/blkid/src/topology/evms.c
+++ b/shlibs/blkid/src/topology/evms.c
@@ -23,6 +23,11 @@
 #include "topology.h"
 
 #define EVMS_MAJOR		117
+
+#ifndef _IOT__IOTBASE_u_int32_t
+#define _IOT__IOTBASE_u_int32_t IOT_SIMPLE(u_int32_t)
+#endif
+#define _IOT_evms_stripe_info _IOT (_IOTS(u_int32_t), 2, 0, 0, 0, 0)
 #define EVMS_GET_STRIPE_INFO	_IOR(EVMS_MAJOR, 0xF0, struct evms_stripe_info)
 
 struct evms_stripe_info {
diff --git a/shlibs/blkid/src/topology/md.c b/shlibs/blkid/src/topology/md.c
index a761e17..d7275ed 100644
--- a/shlibs/blkid/src/topology/md.c
+++ b/shlibs/blkid/src/topology/md.c
@@ -26,6 +26,10 @@
 #define MD_MAJOR	9
 #endif
 
+#ifndef _IOT__IOTBASE_uint32_t
+#define _IOT__IOTBASE_uint32_t IOT_SIMPLE(uint32_t)
+#endif
+#define _IOT_md_array_info _IOT (_IOTS(uint32_t), 18, 0, 0, 0, 0)
 #define GET_ARRAY_INFO          _IOR (MD_MAJOR, 0x11, struct md_array_info)
 
 struct md_array_info {
diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c
index 3c23748..cb6a91d 100644
--- a/shlibs/mount/src/tab.c
+++ b/shlibs/mount/src/tab.c
@@ -55,6 +55,7 @@
 
 #include "nls.h"
 #include "mountP.h"
+#include "c.h"
 
 /**
  * mnt_new_tab:
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux