Skip to content

Commit f636a03

Browse files
committed
Merge branch 'master' of https://github.com/TheEssem/qemu-irix
2 parents a5ef4c3 + 67496be commit f636a03

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

configure

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5137,6 +5137,20 @@ if compile_prog "" "" ; then
51375137
have_fsxattr=yes
51385138
fi
51395139

5140+
##########################################
5141+
# check if sys/mount.h conflicts with linux/fs.h
5142+
5143+
have_sysmount_fs=no
5144+
cat > $TMPC << EOF
5145+
#include <sys/mount.h>
5146+
int main(void) {
5147+
return FSCONFIG_SET_FLAG;
5148+
}
5149+
EOF
5150+
if compile_prog "" "" ; then
5151+
have_sysmount_fs=yes
5152+
fi
5153+
51405154
##########################################
51415155
# check if rtnetlink.h exists and is useful
51425156
have_rtnetlink=no
@@ -6501,6 +6515,10 @@ if test "$rdma" = "yes" ; then
65016515
echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
65026516
fi
65036517

6518+
if test "$have_sysmount_fs" = "yes" ; then
6519+
echo "CONFIG_SYS_MOUNT_FS=y" >> $config_host_mak
6520+
fi
6521+
65046522
if test "$have_rtnetlink" = "yes" ; then
65056523
echo "CONFIG_RTNETLINK=y" >> $config_host_mak
65066524
fi

linux-user/syscall.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,24 @@
9898
#include <linux/soundcard.h>
9999
#include <linux/kd.h>
100100
#include <linux/mtio.h>
101+
#ifdef CONFIG_SYS_MOUNT_FS
102+
/*
103+
* glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
104+
* which in turn prevents use of linux/fs.h. So we have to
105+
* define the constants ourselves for now.
106+
*/
107+
#define FS_IOC_GETFLAGS _IOR('f', 1, long)
108+
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
109+
#define FS_IOC_GETVERSION _IOR('v', 1, long)
110+
#define FS_IOC_SETVERSION _IOW('v', 2, long)
111+
#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
112+
#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
113+
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
114+
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
115+
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
116+
#else
101117
#include <linux/fs.h>
118+
#endif
102119
#if defined(CONFIG_FIEMAP)
103120
#include <linux/fiemap.h>
104121
#endif

0 commit comments

Comments
 (0)