haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
197 stars 50 forks source link

One more error with macos and time.h #274

Open alicerum opened 2 years ago

alicerum commented 2 years ago

While attempting to depend on the ncurses package, build fails with:

Configuring ncurses-0.2.16...
Preprocessing library for ncurses-0.2.16..
c2hs: C header contains errors:

/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/time.h:198: (column 23) [ERROR]  >>> Syntax error !
  The symbol `(' does not fit here.

time.h on line 198 looks like this:

__API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0))

I haven't yet found the workaround that would work.

SkinyMonkey commented 1 year ago

Same problem here. Could anyone point us to a fix/hint/issue please?

SkinyMonkey commented 1 year ago

Really dirty workaround : remove that line, build and put it back...