Skip to content

OSX 10.12 compilation warning: syscall is deprecated #185

Closed
@pwnall

Description

The relevant snippets are below.

/Users/pwnall/workspace/glog/src/raw_logging.cc:153:3: warning: 'syscall' is deprecated: first deprecated in
      macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use
      kdebug_signpost(). [-Wdeprecated-declarations]
  safe_write(STDERR_FILENO, buffer, strlen(buffer));
  ^
/Users/pwnall/workspace/glog/src/raw_logging.cc:63:34: note: expanded from macro 'safe_write'
# define safe_write(fd, s, len)  syscall(SYS_write, fd, s, len)
                                 ^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
1 warning generated.
/Users/pwnall/workspace/glog/src/utilities.cc:254:17: warning: 'syscall' is deprecated: first deprecated in
      macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use
      kdebug_signpost(). [-Wdeprecated-declarations]
    pid_t tid = syscall(__NR_gettid);
                ^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
1 warning generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions