Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2013 05:00:18 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258465 - head/sys/netpfil/ipfw
Message-ID:  <201311220500.rAM50Iha021434@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Fri Nov 22 05:00:18 2013
New Revision: 258465
URL: http://svnweb.freebsd.org/changeset/base/258465

Log:
  make this code compile in userspace on OSX

Modified:
  head/sys/netpfil/ipfw/ip_fw_log.c

Modified: head/sys/netpfil/ipfw/ip_fw_log.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_log.c	Fri Nov 22 04:59:17 2013	(r258464)
+++ head/sys/netpfil/ipfw/ip_fw_log.c	Fri Nov 22 05:00:18 2013	(r258465)
@@ -85,8 +85,15 @@ __FBSDID("$FreeBSD$");
 #define	ICMP(p)		((struct icmphdr *)(p))
 #define	ICMP6(p)	((struct icmp6_hdr *)(p))
 
+#ifdef __APPLE__
+#undef snprintf
+#define snprintf	sprintf
+#define SNPARGS(buf, len) buf + len
+#define SNP(buf) buf
+#else	/* !__APPLE__ */
 #define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0
 #define SNP(buf) buf, sizeof(buf)
+#endif /* !__APPLE__ */
 
 #ifdef WITHOUT_BPF
 void



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