Commit 8690e42010a645dfede7779be2d3013bfc453966

Authored by aurel32
1 parent 8c0ab41f

linux-user: fix inotify syscalls

Configure test was broken, so the breakage of the #ifdef'd
code was not noticed.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7134 c046a42c-6fe2-441c-8c8c-71466251a162
configure
@@ -1195,7 +1195,7 @@ int @@ -1195,7 +1195,7 @@ int
1195 main(void) 1195 main(void)
1196 { 1196 {
1197 /* try to start inotify */ 1197 /* try to start inotify */
1198 - return inotify_init(void); 1198 + return inotify_init();
1199 } 1199 }
1200 EOF 1200 EOF
1201 if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then 1201 if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
linux-user/syscall.c
@@ -486,6 +486,7 @@ _syscall4(int,sys_utimensat,int,dirfd,const char *,pathname, @@ -486,6 +486,7 @@ _syscall4(int,sys_utimensat,int,dirfd,const char *,pathname,
486 #endif /* CONFIG_ATFILE */ 486 #endif /* CONFIG_ATFILE */
487 487
488 #ifdef CONFIG_INOTIFY 488 #ifdef CONFIG_INOTIFY
  489 +#include <sys/inotify.h>
489 490
490 #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init) 491 #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)
491 static int sys_inotify_init(void) 492 static int sys_inotify_init(void)
@@ -502,7 +503,7 @@ static int sys_inotify_add_watch(int fd,const char *pathname, int32_t mask) @@ -502,7 +503,7 @@ static int sys_inotify_add_watch(int fd,const char *pathname, int32_t mask)
502 #if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch) 503 #if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch)
503 static int sys_inotify_rm_watch(int fd, int32_t wd) 504 static int sys_inotify_rm_watch(int fd, int32_t wd)
504 { 505 {
505 - return (inotify_rm_watch(fd,pathname, wd)); 506 + return (inotify_rm_watch(fd, wd));
506 } 507 }
507 #endif 508 #endif
508 #else 509 #else