Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 541536

Summary: sys-apps/setserial - add Mac OS X support
Product: Gentoo/Alt Reporter: Christopher Friedt <chrisfriedt>
Component: Mac OSXAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: prefix
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: setserial-2.17-mac-os-x.patch

Description Christopher Friedt 2015-02-27 15:35:42 UTC
Created attachment 397618 [details, diff]
setserial-2.17-mac-os-x.patch

setserial-2.17 does not compile on mac os x.

I am using setserial-2.17-r4 from prefix.

Not sure if this is yet fixed upstream.

Build failed initially with:
x86_64-apple-darwin13-gcc -march=nocona -O2 -pipe -I/Users/cfriedt/Gentoo/usr/include -I/usr/include    -I. setserial.c -o setserial
couldn't understand kern.osversion `14.1.0'
setserial.c: In function ‘get_serial’:
setserial.c:431: error: ‘TIOCGSERIAL’ undeclared (first use in this function)
setserial.c:431: error: (Each undeclared identifier is reported only once
setserial.c:431: error: for each function it appears in.)
setserial.c: In function ‘set_serial’:
setserial.c:497: error: ‘TIOCGSERIAL’ undeclared (first use in this function)
setserial.c:574: error: ‘TIOCSSERIAL’ undeclared (first use in this function)
setserial.c:578: error: ‘TIOCSERCONFIG’ undeclared (first use in this function)
setserial.c: In function ‘do_wild_intr’:
setserial.c:635: error: ‘TIOCSERSWILD’ undeclared (first use in this function)
setserial.c:639: error: ‘TIOCSERGWILD’ undeclared (first use in this function)
Makefile:23: recipe for target 'setserial' failed
make: *** [setserial] Error 1

Fix found via:
http://www.insanelymac.com/forum/topic/155999-compiling-setserial-on-mac-os-x/
Comment 1 Fabian Groffen gentoo-dev 2015-02-28 18:08:14 UTC
does it even work like this?
Comment 2 Christopher Friedt 2016-07-31 12:40:46 UTC
Haha.. I've been using it for years like this. Sorry I didn't reply earlier.
Comment 3 Fabian Groffen gentoo-dev 2016-07-31 17:24:51 UTC
thanks