Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2010 19:59:54 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r202168 - projects/jbuild/usr.bin/jbuild/filemon
Message-ID:  <201001121959.o0CJxsxc085620@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Tue Jan 12 19:59:54 2010
New Revision: 202168
URL: http://svn.freebsd.org/changeset/base/202168

Log:
  linkat() is only available for FreeBSD_version 800032 and higher.

Modified:
  projects/jbuild/usr.bin/jbuild/filemon/filemon_wrapper.c

Modified: projects/jbuild/usr.bin/jbuild/filemon/filemon_wrapper.c
==============================================================================
--- projects/jbuild/usr.bin/jbuild/filemon/filemon_wrapper.c	Tue Jan 12 19:55:07 2010	(r202167)
+++ projects/jbuild/usr.bin/jbuild/filemon/filemon_wrapper.c	Tue Jan 12 19:59:54 2010	(r202168)
@@ -339,6 +339,11 @@ filemon_wrapper_symlink(struct thread *t
 	return(ret);
 }
 
+#if __FreeBSD_version > 800032
+#define FILEMON_HAS_LINKAT
+#endif
+
+#ifdef FILEMON_HAS_LINKAT
 static int
 filemon_wrapper_linkat(struct thread *td, struct linkat_args *uap)
 {
@@ -373,7 +378,7 @@ filemon_wrapper_linkat(struct thread *td
 
 	return(ret);
 }
-
+#endif
 static int
 filemon_wrapper_stat(struct thread *td, struct stat_args *uap)
 {
@@ -565,7 +570,9 @@ filemon_wrapper_install(void)
 	sv_table[SYS_vfork].sy_call = (sy_call_t *) filemon_wrapper_vfork;
 	sv_table[SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
 	sv_table[SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
+#ifdef FILEMON_HAS_LINKAT
 	sv_table[SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
+#endif
 
 #ifdef COMPAT_IA32
 	sv_table = ia32_freebsd_sysvec.sv_table;
@@ -581,8 +588,10 @@ filemon_wrapper_install(void)
 	sv_table[FREEBSD32_SYS_vfork].sy_call = (sy_call_t *) filemon_wrapper_vfork;
 	sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
 	sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
+#ifdef FILEMON_HAS_LINKAT
 	sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
 #endif
+#endif
 
 
 }
@@ -609,7 +618,9 @@ filemon_wrapper_deinstall(void)
 	sv_table[SYS_vfork].sy_call = (sy_call_t *) vfork;
 	sv_table[SYS_link].sy_call = (sy_call_t *) link;
 	sv_table[SYS_symlink].sy_call = (sy_call_t *) symlink;
+#ifdef FILEMON_HAS_LINKAT
 	sv_table[SYS_linkat].sy_call = (sy_call_t *) linkat;
+#endif
 
 #ifdef COMPAT_IA32
 	sv_table = ia32_freebsd_sysvec.sv_table;
@@ -625,7 +636,9 @@ filemon_wrapper_deinstall(void)
 	sv_table[FREEBSD32_SYS_vfork].sy_call = (sy_call_t *) vfork;
 	sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *) link;
 	sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *) symlink;
+#ifdef FILEMON_HAS_LINKAT
 	sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) linkat;
 #endif
+#endif
 
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001121959.o0CJxsxc085620>