You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with syslog.h in High Sierra

Hi everyone,


Since updating to High Sierra on my MBP 2017, it seems there is a problem with /usr/include/sys/syslog.h.


According to the GNU compiler, the asm declaration should be placed before the attributes declaration which is not the case in syslog.h.


As an example, the following code does not compile with gcc5 on High Sierra.


#include <syslog.h>
int main() {
  return 0;
}


It returns :

/usr/include/sys/syslog.h:227:124: error: expected ',' or ';' before '__asm'
void syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called __DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog));


Any idea on how to solve this issue ?


Thanks.

Posted on Oct 22, 2017 4:58 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 16, 2017 2:24 AM

Each of the following work-arounds work for me:


  1. Adding gcc option -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
  2. Adding gcc option -mmacosx-version-min=10.12 (from gcc6)
3 replies

Problem with syslog.h in High Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.