dma
dma copied to clipboard
Buildfix for dma on SunOS
To build dma on SunOS (tested on SmartOS) it's required to rename existing queue struct to dma_queue (or anything else). To decrease the warnings I also included strings.h for the bzero and bcopy function. The sys/sysmacros.h include is required for the roundup function.
The following additional LDFLAGS are required on SunOS. I'm not sure how to reflect that in your Makefile:
-lsocket -lnsl
This should hopefully fix #1.
Why can't an application use the identifier queue? Can you point me to a relevant header?
If I'm correct it's the stream.h (/usr/include/sys/stream.h) which already uses queue. It's mostly also described in #1 and I know it's mostly one of the easiest solution to rename the struct ;-)
In file included from crypto.c:45:0:
dma.h:121:8: error: redefinition of 'struct queue'
struct queue {
^
In file included from /usr/include/netinet/in.h:68:0,
from /usr/include/sys/socket.h:57,
from dma.h:42,
from crypto.c:45:
/usr/include/sys/stream.h:112:16: note: originally defined here
typedef struct queue {
^
I've got a patch for illumos that does the same (renames struct queue to dma_queue) and does a bit more as well (bcopy -> memmove, bzero -> memset)
drscream: is this against Solaris 11? I take it that Solaris 11 introduced lockf() recently?
My diff is here: http://elemental.org/webrevs/dma-illumos-port.patch
@daleghent it's only tested with pkgsrc on SmartOS (illumos distribution).