Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildfix for dma on SunOS #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drscream
Copy link
Contributor

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.

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.
@corecode
Copy link
Owner

Why can't an application use the identifier queue? Can you point me to a relevant header?

@drscream
Copy link
Contributor Author

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 {
                ^

@daleghent
Copy link

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

@drscream
Copy link
Contributor Author

@daleghent it's only tested with pkgsrc on SmartOS (illumos distribution).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to compile on Solaris
3 participants