Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: implicit declaration of function 'sched_setscheduler' #90

Open
Talbot3 opened this issue Jul 29, 2019 · 0 comments
Open

error: implicit declaration of function 'sched_setscheduler' #90

Talbot3 opened this issue Jul 29, 2019 · 0 comments

Comments

@Talbot3
Copy link

Talbot3 commented Jul 29, 2019

hi, rtpproxy compile on macosx failed.

Env

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
brew upgrade gcc
gcc 9.1.0 already installed

Log

make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
gcc -DWITHOUT_SIPLOG -Wall -DRTPP_LOG_ADVANCED -DHAVE_CONFIG_H -I.    -Werror=implicit-function-declaration -Wall -g -O2 -MT rtpproxy-main.o -MD -MP -MF .deps/rtpproxy-main.Tpo -c -o rtpproxy-main.o `test -f 'main.c' || echo './'`main.c
main.c:807:13: error: implicit declaration of function 'sched_setscheduler' is invalid
      in C99 [-Werror,-Wimplicit-function-declaration]
        if (sched_setscheduler(0, cf.stable->sched_policy, &sparam) == -1) {
            ^
1 error generated.
make[1]: *** [rtpproxy-main.o] Error 1
make: *** [all] Error 2

Fix

macosx not support sched_setscheduler api. i just know little c language. could you replace this api on macosx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant