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

build: Support for CentOS7 #18

Merged
merged 1 commit into from
May 27, 2021
Merged

build: Support for CentOS7 #18

merged 1 commit into from
May 27, 2021

Conversation

lhp-git
Copy link
Contributor

@lhp-git lhp-git commented May 25, 2021

The 2.0.0 release of uvgRTP fails to build on CentOS7, because :

  • the gcc-c++ compiler doesn't support the c++17 standard, which is
    required to compile the crypto.hh file
  • the getrandom() function isn't available in the libc

This pull request adds CentOS7 build support.

The modified files are :

  • CMakeLists.txt : the availability of the getrandom() function is checked.
    If it exists, the HAVE_GETRANDOM preprocessor definition is added

  • src/random.cc : if HAVE_GETRANDOM isn't defined, a syscall equivalent to
    the getrandom() functions is called

  • include/crypto.hh : the c++17 code is replaced by a code that compiles with
    the CentOS7 compiler (c++11)

The 2.0.0 release of uvgRTP fails to build on CentOS7, because :
- the gcc-c++ compiler doesn't support the c++17 standard, which is
  required to compile the crypto.hh file
- the getrandom() function isn't available in the libc

This pull request adds CentOS7 build support.

The modified files are :

- CMakeLists.txt : the availability of the getrandom() function is checked.
  If it exists, the HAVE_GETRANDOM preprocessor definition is added

- src/random.cc : if HAVE_GETRANDOM isn't defined, a syscall equivalent to
  the getrandom() functions is called

- include/crypto.hh : the c++17 code is replaced by a code that compiles with
  the CentOS7 compiler (c++11)
@jrsnen
Copy link
Member

jrsnen commented May 26, 2021

The commit looks very good now! Thank you. I'll try to test it this week when I have time.

@jrsnen jrsnen merged commit 65cc5fe into ultravideo:master May 27, 2021
@jrsnen
Copy link
Member

jrsnen commented May 27, 2021

Thank! I merged this pull request. I'll update the documentation and fix one small issue related to msvc, but otherwise this was very good. Hopefully this helps those with older compilers use uvgRTP.

@lhp-git lhp-git deleted the build-centos7 branch May 28, 2021 19:09
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

Successfully merging this pull request may close these issues.

None yet

2 participants