Opened 17 years ago

Last modified 10 years ago

#14590 new defect

liboss: compile errors in soundcard.h

Reported by: madcap@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: cooljeanius (Eric Gallager)
Port: liboss

Description (last modified by mf2k (Frank Schima))

Beginning on line 341 of soundcard.h, several system functions are redefined, such as follows:

    #ifndef LIBOSS_IOCTL
    # define LIBOSS_IOCTL ioctl
    #endif

...

    static inline int LIBOSS_IOCTL (int x, unsigned long y,...)

This causes compilation errors in code including that file, such as:

    /opt/local/include/liboss/soundcard.h:342: error: static declaration of ‘ioctl’ follows non-static declaration
    /usr/include/sys/ioctl.h:97: error: previous declaration of ‘ioctl’ was here

Change History (7)

comment:1 Changed 17 years ago by jmroot (Joshua Root)

Milestone: Port Bugs
Owner: changed from macports-tickets@… to pguyot@…

Assigning to maintainer.

comment:2 Changed 16 years ago by pguyot (Paul Guyot)

Resolution: worksforme
Status: newclosed

What system are you using ? liboss installs fine on my systems.

comment:3 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:4 in reply to:  3 Changed 14 years ago by blaisethom@…

Resolution: worksforme
Status: closedreopened

Replying to None:

Milestone Port Bugs deleted

I've just had the same problem running on MacOSX 10.6.4 (Snow Leopard).

liboss installs fine. Then I make a test file:

// test.cpp

#include <liboss/soundcard.h>

int main(int argc, char** argv)
{

}


////

When I compile I get:

/opt/local/include/liboss/soundcard.h: In function ‘int ioctl(int, long unsigned int, ...)’:
/opt/local/include/liboss/soundcard.h:341: error: ‘int ioctl(int, long unsigned int, ...)’ was declared ‘extern’ and later ‘static’
/usr/include/sys/ioctl.h:97: error: previous declaration of ‘int ioctl(int, long unsigned int, ...)’
/opt/local/include/liboss/soundcard.h: In function ‘int open(const char*, int, ...)’:
/opt/local/include/liboss/soundcard.h:352: error: ‘int open(const char*, int, ...)’ was declared ‘extern’ and later ‘static’
/usr/include/sys/fcntl.h:427: error: previous declaration of ‘int open(const char*, int, ...)’
/opt/local/include/liboss/soundcard.h: In function ‘int close(int)’:
/opt/local/include/liboss/soundcard.h:363: error: ‘int close(int)’ was declared ‘extern’ and later ‘static’
/usr/include/unistd.h:422: error: previous declaration of ‘int close(int)’
/opt/local/include/liboss/soundcard.h: In function ‘int write(int, const void*, size_t)’:
/opt/local/include/liboss/soundcard.h:365: error: declaration of C function ‘int write(int, const void*, size_t)’ conflicts with
/usr/include/unistd.h:513: error: previous declaration ‘ssize_t write(int, const void*, size_t)’ here
/opt/local/include/liboss/soundcard.h:365: error: ‘int write(int, const void*, size_t)’ was declared ‘extern’ and later ‘static’
/usr/include/unistd.h:513: error: previous declaration of ‘ssize_t write(int, const void*, size_t)’

comment:5 Changed 14 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: liboss removed
Port: liboss added

comment:6 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from pguyot@… to macports-tickets@…
Status: reopenednew

comment:7 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.