diff options
-rw-r--r-- | lib/Makefile.am | 4 | ||||
-rw-r--r-- | lib/ismounted.c | 1 | ||||
-rw-r--r-- | schedutils/chrt.c | 10 | ||||
-rw-r--r-- | shlibs/blkid/src/topology/evms.c | 5 | ||||
-rw-r--r-- | shlibs/blkid/src/topology/md.c | 4 | ||||
-rw-r--r-- | shlibs/mount/src/tab.c | 1 |
6 files changed, 25 insertions, 0 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index f34bb928..2a185f34 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 94fe425c..fa7e8225 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 0ff9b9bb..cc40013c 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 baab16ed..574d9f55 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 a761e170..d7275edd 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 3c23748b..cb6a91d3 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: |