Skip to content

Commit

Permalink
Fix glibc 2.36 build (mount.h conflicts)
Browse files Browse the repository at this point in the history
glibc has decided that sys/mount.h and linux/mount.h are no longer
usable at the same time.  This broke the build, since linux/fs.h itself
includes linux/mount.h.  For now, fix the build by only including
sys/mount.h where we need it.

See-also: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
Resolves: #227
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
  • Loading branch information
frozencemetery committed Jul 28, 2022
1 parent 1f24726 commit bc65d63
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gpt.c
Expand Up @@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/utsname.h>
Expand Down
1 change: 1 addition & 0 deletions src/linux.c
Expand Up @@ -20,6 +20,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion src/util.h
Expand Up @@ -23,7 +23,6 @@
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <tgmath.h>
Expand Down

0 comments on commit bc65d63

Please sign in to comment.