Opened 5 years ago

Closed 5 years ago

#58383 closed defect (fixed)

yydecode build fail on Mojave due to typedef mismatch

Reported by: rlhamil Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: yydecode

Description

In file included from crc32.c:20:
./crc32.h:9:30: error: typedef redefinition with different types ('unsigned long' vs 'unsigned int')
   typedef unsigned long int u_int32_t;
                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_u_int32_t.h:30:33: note: previous definition is here
typedef unsigned int            u_int32_t;
                                ^
1 error generated.

Changing the typedef in crc32.h to match the one in the Xcode header fixes it. Not saying that's the best answer, maybe the #ifdef's enclosing the typedef in crc32.h should be checked too. OS: 10.14.4; Xcode: 10.2.1. No idea at what OS and/or Xcode versions it works vs is broken.

Change History (1)

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

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In cdfcd37c2ec95d86537a54b06d7ee5c847f98431/macports-ports (master):

yydecode: fix typedef redefinition

Closes: #58383

Note: See TracTickets for help on using tickets.