bb#9156/10335: switch fanotify support to use sys/fanotify.h instead of coded syscalls

0.98.2
David Raynor 11 years ago
parent cd5ba2e93d
commit c50982c442
  1. 4
      ChangeLog
  2. 28
      clamd/fan-syscalllib.h
  3. 3
      clamd/fan.c
  4. 4
      configure
  5. 2
      configure.ac

@ -1,3 +1,7 @@
Wed Feb 5 14:30:24 2013 EDT 2013 (dar)
------------------------------------
* bb#9156/10335: switch fanotify support to use sys/fanotify.h instead of coded syscalls
Mon Dec 5 18:10:24 2013 EDT 2013 (morgan)
------------------------------------
* bb#9595 fix for sigs targeted for ascii files containing offsets of the form EOF-n.

@ -1,28 +0,0 @@
#ifndef __FANOTIFY_SYSCALL_LIB
#define __FANOTIFY_SYSCALL_LIB
#include <unistd.h>
#include <linux/types.h>
#if defined(__x86_64__)
# define __NR_fanotify_init 300
# define __NR_fanotify_mark 301
#elif defined(__i386__)
# define __NR_fanotify_init 338
# define __NR_fanotify_mark 339
#else
# error "System call numbers not defined for this architecture"
#endif
static inline int fanotify_init(unsigned int flags, unsigned int event_f_flags)
{
return syscall(__NR_fanotify_init, flags, event_f_flags);
}
static inline int fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask,
int dfd, const char *pathname)
{
return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask,
dfd, pathname);
}
#endif

@ -34,8 +34,7 @@
#include <string.h>
#include <errno.h>
#include <linux/fanotify.h>
#include "fan-syscalllib.h"
#include <sys/fanotify.h>
#include "fan.h"
#include "libclamav/clamav.h"

4
configure vendored

@ -17890,8 +17890,8 @@ $as_echo "#define C_LINUX 1" >>confdefs.h
THREAD_LIBS="-lpthread"
TH_SAFE="-thread-safe"
if test "$want_fanotify" = "yes"; then
ac_fn_c_check_header_mongrel "$LINENO" "linux/fanotify.h" "ac_cv_header_linux_fanotify_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_fanotify_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "sys/fanotify.h" "ac_cv_header_sys_fanotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_fanotify_h" = xyes; then :
$as_echo "#define FANOTIFY 1" >>confdefs.h

@ -1072,7 +1072,7 @@ linux*)
THREAD_LIBS="-lpthread"
TH_SAFE="-thread-safe"
if test "$want_fanotify" = "yes"; then
AC_CHECK_HEADER([linux/fanotify.h],AC_DEFINE([FANOTIFY],1,[use fanotify]),)
AC_CHECK_HEADER([sys/fanotify.h],AC_DEFINE([FANOTIFY],1,[use fanotify]),)
fi
fi
;;

Loading…
Cancel
Save