Ticket #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: | ||
| Port: | liboss |
Description (last modified by macsforever2000@…) (diff)
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
comment:1 Changed 5 years ago by jmr@…
- Owner changed from macports-tickets@… to pguyot@…
- Milestone set to Port Bugs
comment:2 Changed 5 years ago by pguyot@…
- Status changed from new to closed
- Resolution set to worksforme
What system are you using ? liboss installs fine on my systems.
comment:3 follow-up: ↓ 4 Changed 4 years ago by anonymous
- Milestone Port Bugs deleted
Milestone Port Bugs deleted
comment:4 in reply to: ↑ 3 Changed 3 years ago by blaisethom@…
- Status changed from closed to reopened
- Resolution worksforme deleted
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)’
Note: See
TracTickets for help on using
tickets.


Assigning to maintainer.