Revision c2882b96

b/configure
1322 1322
  splice=yes
1323 1323
fi
1324 1324

  
1325
# check if eventfd is supported
1326
eventfd=no
1327
cat > $TMPC << EOF
1328
#include <sys/eventfd.h>
1329

  
1330
int main(void)
1331
{
1332
    int efd = eventfd(0, 0);
1333
    return 0;
1334
}
1335
EOF
1336
if compile_prog "" "" ; then
1337
  eventfd=yes
1338
fi
1339

  
1325 1340
# Check if tools are available to build documentation.
1326 1341
if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x "`which pod2man 2>/dev/null`" \) ; then
1327 1342
  build_docs="no"
......
1659 1674
if test "$splice" = "yes" ; then
1660 1675
  echo "CONFIG_SPLICE=y" >> $config_host_mak
1661 1676
fi
1677
if test "$eventfd" = "yes" ; then
1678
  echo "CONFIG_EVENTFD=y" >> $config_host_mak
1679
fi
1662 1680
if test "$inotify" = "yes" ; then
1663 1681
  echo "CONFIG_INOTIFY=y" >> $config_host_mak
1664 1682
fi
b/linux-user/syscall.c
60 60
#ifdef TARGET_GPROF
61 61
#include <sys/gmon.h>
62 62
#endif
63
#ifdef CONFIG_EVENTFD
64
#include <sys/eventfd.h>
65
#endif
63 66

  
64 67
#define termios host_termios
65 68
#define winsize host_winsize
......
6974 6977
        break;
6975 6978
#endif
6976 6979
#endif /* CONFIG_SPLICE */
6980
#ifdef CONFIG_EVENTFD
6981
#if defined(TARGET_NR_eventfd)
6982
    case TARGET_NR_eventfd:
6983
        ret = get_errno(eventfd(arg1, 0));
6984
        break;
6985
#endif
6986
#if defined(TARGET_NR_eventfd2)
6987
    case TARGET_NR_eventfd2:
6988
        ret = get_errno(eventfd(arg1, arg2));
6989
        break;
6990
#endif
6991
#endif /* CONFIG_EVENTFD  */
6977 6992
    default:
6978 6993
    unimplemented:
6979 6994
        gemu_log("qemu: Unsupported syscall: %d\n", num);

Also available in: Unified diff