Opened 4 years ago
Closed 3 years ago
#62219 closed defect (fixed)
netperf @2.7.0: error: implicit declaration of function 'read' is invalid in C99
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | grimreaper (Eitan Adler) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | catalina bigsur monterey haspatch | Cc: | |
Port: | netperf |
Description
netperf does not build with Xcode 12 or later due to the well-known implicit declaration of function problem.
net_uuid.c:158:5: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration] read(fd, seed, 16); ^ net_uuid.c:158:5: note: did you mean 'fread'? /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/stdio.h:158:9: note: 'fread' declared here size_t fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream); ^ net_uuid.c:159:5: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] close(fd); ^
The fix is to patch the code to include the system headers that define these functions. Maybe upstream already fixed it; if so, we use their patch. If not, we report it to them.
Change History (3)
comment:1 Changed 3 years ago by hpux735 (William Dillon)
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | monterey haspatch added |
---|
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Did you have a patch for this, or not yet?