From: Greg T. <gd...@le...> - 2024-07-10 17:55:09
|
Matt Broughton <wal...@ma...> writes: > FWIW, on macos 12.7.5, I do have to edit the `configure` line 19887 > and delete '-D_POSIX_C_SOURCE=200809L -std=c99' to get v5.3.5-pre1 to > build. If left in, the build will fail with errors of the type: That's very interesting you see the same error on macOS as what I am seeing on NetBSD (but I hear that apple adopted NetBSD's networking stack and this is pbobably very longstanding code). That is great progress to get it to build. Did you, or could you, try with removing the -DPOSIX_C_SOURCE=200809L, and leaving --std=c99? I am guessing that will be ok. Visibility defines are tricky. While they appear to say "make everything required by this standard visible", they really are "make *only* what this standard requires visible". Many things in an OS are removed from visibility by them. I wonder why that define exists in the first place. Normally programs expect the posix+local-os environment, and that's almost always ok. I believe that there are some systems that make an older standard available by default, and you have to ask for something more modern. Then, one would have to have defines to not only have the modern posix, but also turn back on the OS extensions that are expected, all ifdef'd on the OS that needs it. |