Re: [PATCH 1 of 2] make major and minor available on Solaris

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

 



On Tue, Jan 18, 2011 at 06:00:38PM +0100, Fabian Groffen wrote:
> On 18-01-2011 00:35:25 +0100, Karel Zak wrote:
> > On Mon, Jan 17, 2011 at 10:00:34PM +0100, Fabian Groffen wrote:
> > > --- a/shlibs/blkid/src/partitions/partitions.c
> > > +++ b/shlibs/blkid/src/partitions/partitions.c
> > > @@ -14,6 +14,9 @@
> > >  #include <fcntl.h>
> > >  #include <ctype.h>
> > >  #include <sys/types.h>
> > > +#if HAVE_SYS_MKDEV_H
> > > +#include <sys/mkdev.h>
> > > +#endif
> > 
> >  What about to include <sys/mkdev.h> from include/blkdev.h to make it
> >  available in all places in the package?
> 
> This file in particular doesn't include blkdev.h, so that would mean

 not true, included in shlibs/blkid/src/blkidP.h, so available
 everywhere in liblkid

> adding that include in all places.  Is that what you are after here?

 I've applied the patch below.

    Karel

 
>From 960f668f17ae6bb9bd5edea1b9fe05ad4d5c2850 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@xxxxxxxxxx>
Date: Thu, 20 Jan 2011 23:16:41 +0100
Subject: [PATCH] make major and minor available on Solaris

Reported-by: Fabian Groffen <grobian@xxxxxxxxxx>
Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>
---
 include/blkdev.h            |    4 ++++
 shlibs/blkid/src/config.c   |    3 ---
 shlibs/blkid/src/devname.c  |    3 ---
 shlibs/blkid/src/evaluate.c |    3 ---
 shlibs/blkid/src/probe.c    |    3 ---
 shlibs/blkid/src/save.c     |    3 ---
 6 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/include/blkdev.h b/include/blkdev.h
index 5344a2b..86fffcf 100644
--- a/include/blkdev.h
+++ b/include/blkdev.h
@@ -6,6 +6,10 @@
 #include <fcntl.h>
 #include <unistd.h>
 
+#if HAVE_SYS_MKDEV_H
+# include <sys/mkdev.h>		/* major and minor on Solaris */
+#endif
+
 #define DEFAULT_SECTOR_SIZE       512
 
 #ifdef __linux__
diff --git a/shlibs/blkid/src/config.c b/shlibs/blkid/src/config.c
index e4d25ba..e796400 100644
--- a/shlibs/blkid/src/config.c
+++ b/shlibs/blkid/src/config.c
@@ -17,9 +17,6 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
-#endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/shlibs/blkid/src/devname.c b/shlibs/blkid/src/devname.c
index 64b3432..68e3923 100644
--- a/shlibs/blkid/src/devname.c
+++ b/shlibs/blkid/src/devname.c
@@ -32,9 +32,6 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#if HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
-#endif
 #include <time.h>
 
 #include "blkidP.h"
diff --git a/shlibs/blkid/src/evaluate.c b/shlibs/blkid/src/evaluate.c
index 9f987b1..5cd569e 100644
--- a/shlibs/blkid/src/evaluate.c
+++ b/shlibs/blkid/src/evaluate.c
@@ -16,9 +16,6 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
-#endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c
index 0ef6f29..eee8ddf 100644
--- a/shlibs/blkid/src/probe.c
+++ b/shlibs/blkid/src/probe.c
@@ -97,9 +97,6 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
-#endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/shlibs/blkid/src/save.c b/shlibs/blkid/src/save.c
index c04c224..a71b068 100644
--- a/shlibs/blkid/src/save.c
+++ b/shlibs/blkid/src/save.c
@@ -18,9 +18,6 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
-#endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
-- 
1.7.3.3


--
To unsubscribe from this list: send the line "unsubscribe util-linux" 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