diff mbox series

device-utils.c: Use linux mount.h instead of sys/mount.h

Message ID 20220725185835.1356165-1-raj.khem@gmail.com (mailing list archive)
State New, archived
Headers show
Series device-utils.c: Use linux mount.h instead of sys/mount.h | expand

Commit Message

Khem Raj July 25, 2022, 6:58 p.m. UTC
This file includes linucx/fs.h which includes linux/mount.h and with
glibc 2.36 linux/mount.h and glibc mount.h are not compatible [1]
therefore try to avoid including both headers

[1] https://sourceware.org/glibc/wiki/Release/2.36

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 common/device-utils.c | 1 -
 1 file changed, 1 deletion(-)

Comments

David Sterba July 27, 2022, 7:36 p.m. UTC | #1
On Mon, Jul 25, 2022 at 11:58:35AM -0700, Khem Raj wrote:
> This file includes linucx/fs.h which includes linux/mount.h and with
> glibc 2.36 linux/mount.h and glibc mount.h are not compatible [1]
> therefore try to avoid including both headers
> 
> [1] https://sourceware.org/glibc/wiki/Release/2.36
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

I don't have 2.36 available yet so can't test it, but it builds on all
the older distros so it's safe. Added to devel, thanks.
diff mbox series

Patch

diff --git a/common/device-utils.c b/common/device-utils.c
index 617b6746..25a4fb8c 100644
--- a/common/device-utils.c
+++ b/common/device-utils.c
@@ -15,7 +15,6 @@ 
  */
 
 #include <sys/ioctl.h>
-#include <sys/mount.h>
 #include <sys/statfs.h>
 #include <sys/types.h>
 #include <stdio.h>