fix build on 4.x without libgnugetopt

Submitted by:	Daniel Roethlisberger <daniel@roe.ch> (maintainer)
Reported by:	kris
This commit is contained in:
Oliver Eikemeier 2004-05-28 22:54:07 +00:00
parent 263da1c74b
commit 5bf9ca5e02
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110248
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,17 @@
--- bin/spf_example/spf_example.c.orig Sat Apr 10 00:08:41 2004
+++ bin/spf_example/spf_example.c Fri May 28 22:59:52 2004
@@ -55,8 +55,12 @@
# include <arpa/inet.h> /* in_addr struct */
#endif
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
+#if defined(__FreeBSD__)
+#if (OSVERSION > 500000)
+#include "getopt.h"
+#else
+#include "unistd.h"
+#endif
#endif

View File

@ -0,0 +1,17 @@
--- bin/spf_example/spf_example_2mx.c.orig Sat Apr 10 00:08:39 2004
+++ bin/spf_example/spf_example_2mx.c Fri May 28 23:00:10 2004
@@ -56,8 +56,12 @@
# include <arpa/inet.h> /* in_addr struct */
#endif
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
+#if defined(__FreeBSD__)
+#if (OSVERSION > 500000)
+#include "getopt.h"
+#else
+#include "unistd.h"
+#endif
#endif