- Fix serial ports name for FreeBSD >= 6.0

PR:		ports/89282
Reported by:	Karsten Thygesen
This commit is contained in:
Sergey Matveychuk 2005-11-27 07:40:51 +00:00
parent b1403e83da
commit 4ff4d59982
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=149650
2 changed files with 28 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= serialport
PORTVERSION= 0.6
PORTREVISION= 1
CATEGORIES= comms ruby
MASTER_SITES= http://rubyforge.org/frs/download.php/72/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}

View file

@ -0,0 +1,27 @@
--- serialport.c.orig Sun Nov 27 10:28:52 2005
+++ serialport.c Sun Nov 27 10:35:17 2005
@@ -20,6 +20,10 @@
#include <ruby.h> /* ruby inclusion */
#include <rubyio.h> /* ruby io inclusion */
+#if defined (freebsd)
+#include <sys/param.h>
+#endif
+
struct modem_params {
int data_rate;
int data_bits;
@@ -569,9 +573,12 @@
#if defined(linux) || defined(cygwin)
"/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3",
"/dev/ttyS4", "/dev/ttyS5", "/dev/ttyS6", "/dev/ttyS7"
-#elif defined(freebsd) || defined(netbsd) || defined(openbsd)
+#elif (defined(freebsd) && __FreeBSD_version < 600006) || defined(netbsd) || defined(openbsd)
"/dev/cuaa0", "/dev/cuaa1", "/dev/cuaa2", "/dev/cuaa3",
"/dev/cuaa4", "/dev/cuaa5", "/dev/cuaa6", "/dev/cuaa7"
+#elif (defined(freebsd) && __FreeBSD_version >= 600006)
+ "/dev/cuad0", "/dev/cuad1", "/dev/cuad2", "/dev/cuad3",
+ "/dev/cuad4", "/dev/cuad5", "/dev/cuad6", "/dev/cuad7"
#elif defined(solaris)
"/dev/ttya", "/dev/ttyb", "/dev/ttyc", "/dev/ttyd",
"/dev/ttye", "/dev/ttyf", "/dev/ttyg", "/dev/ttyh"