Skip to content

memory_patcher_component.c: syscall() deprecated on MacOS #5671

Closed
@jsquyres

Description

@jsquyres

I note that when compiling on MacOS 10.13/High Sierra, I get the following compilation warnings from patcher.

This is clearly not a problem yet (as of Sep 2018), but it will eventually bite us if MacOS actually removes syscall(). Someone else noted this same issue about 2 years ago (in MacOS 10.12/Sierra): hbowden/nextgen#11

  CC       memory_patcher_component.lo
memory_patcher_component.c:166:18: 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]
        result = memory_patcher_syscall(SYS_munmap, start, length);
                 ^
memory_patcher_component.c:98:32: note: expanded from macro 'memory_patcher_syscall'
#define memory_patcher_syscall syscall
                               ^
/usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
memory_patcher_component.c:268:18: 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]
        result = memory_patcher_syscall(SYS_madvise, start, length, advice);
                 ^
memory_patcher_component.c:98:32: note: expanded from macro 'memory_patcher_syscall'
#define memory_patcher_syscall syscall
                               ^
/usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
2 warnings generated.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions