Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/TheEssem/qemu-irix
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-ex-N committed Jan 11, 2025
2 parents a5ef4c3 + 67496be commit f636a03
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5137,6 +5137,20 @@ if compile_prog "" "" ; then
have_fsxattr=yes
fi

##########################################
# check if sys/mount.h conflicts with linux/fs.h

have_sysmount_fs=no
cat > $TMPC << EOF
#include <sys/mount.h>
int main(void) {
return FSCONFIG_SET_FLAG;
}
EOF
if compile_prog "" "" ; then
have_sysmount_fs=yes
fi

##########################################
# check if rtnetlink.h exists and is useful
have_rtnetlink=no
Expand Down Expand Up @@ -6501,6 +6515,10 @@ if test "$rdma" = "yes" ; then
echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
fi

if test "$have_sysmount_fs" = "yes" ; then
echo "CONFIG_SYS_MOUNT_FS=y" >> $config_host_mak
fi

if test "$have_rtnetlink" = "yes" ; then
echo "CONFIG_RTNETLINK=y" >> $config_host_mak
fi
Expand Down
17 changes: 17 additions & 0 deletions linux-user/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,24 @@
#include <linux/soundcard.h>
#include <linux/kd.h>
#include <linux/mtio.h>
#ifdef CONFIG_SYS_MOUNT_FS
/*
* glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
* which in turn prevents use of linux/fs.h. So we have to
* define the constants ourselves for now.
*/
#define FS_IOC_GETFLAGS _IOR('f', 1, long)
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
#define FS_IOC_GETVERSION _IOR('v', 1, long)
#define FS_IOC_SETVERSION _IOW('v', 2, long)
#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
#else
#include <linux/fs.h>
#endif
#if defined(CONFIG_FIEMAP)
#include <linux/fiemap.h>
#endif
Expand Down

0 comments on commit f636a03

Please sign in to comment.