5.x's <usbhid.h> lacks __BEGIN_DECLS / __END_DECLS, so we need to wrap

it in extern "C" { }.
This commit is contained in:
Dag-Erling Smørgrav 2004-06-03 15:08:38 +00:00
parent 32d9453566
commit ed66a44c6d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110777
2 changed files with 6 additions and 7 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= plib
PORTVERSION= 1.8.3
PORTREVISION= 1
CATEGORIES= x11-toolkits
MASTER_SITES= http://plib.sourceforge.net/dist/

View File

@ -1,5 +1,5 @@
--- ./src/js/jsBSD.cxx.orig Sat Mar 20 01:21:53 2004
+++ ./src/js/jsBSD.cxx Sun May 2 16:53:28 2004
--- src/js/jsBSD.cxx.orig Sat Mar 20 01:21:53 2004
+++ src/js/jsBSD.cxx Thu Jun 3 17:06:30 2004
@@ -44,7 +44,11 @@
#endif
@ -13,19 +13,17 @@
#ifdef HAVE_USB_JS
#if defined(__NetBSD__)
#ifdef HAVE_USBHID_H
@@ -53,9 +57,14 @@
#include <usb.h>
@@ -54,7 +58,12 @@
#endif
#elif defined(__FreeBSD__)
+# if __FreeBSD_version < 500000
extern "C" {
-#include <libusbhid.h>
+# if __FreeBSD_version < 500000
+# include <libusbhid.h>
}
+# else
+# define HAVE_USBHID_H 1
+# include <usbhid.h>
+# endif
}
#endif
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>