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

Fix build for Linux GLIBC-2.8 and earlier. #2103

Merged
merged 4 commits into from Aug 27, 2021
Merged

Fix build for Linux GLIBC-2.8 and earlier. #2103

merged 4 commits into from Aug 27, 2021

Conversation

jlsantiago0
Copy link
Contributor

epoll_create1() and EPOLL_CLOEXEC were introduced in GLIBC-2.9.

This patch fixes the build for GLIBC-2.8 and earlier targets.

Tested on CentOS5.

srtcore/epoll.cpp Outdated Show resolved Hide resolved
localid = epoll_create1(flags);

// NOTE: epoll_create1() and EPOLL_CLOEXEC were introduced in GLIBC-2.9.
// So earlier versions of GLIBC, must use epoll_create() and set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really interested what Linux distribution with glibc earlier than 2.9 needs to support libsrt?
glibc-2.9 was released in 2008.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many embedded projects have older runtime libraries and toolchains. For instance Makito Classic is <glibc-2.9.

CentOS5 and earlier have <glibc-2.9. Many projects that distribute linux binaries will compile with an older linux distribution so that they can ensure that their program will run on a wide variety of Linux distros. For instance when I distribute HVIORouter, I currently build it with CentOS6 for distribution, and up until very recently with CentOS5.

@maxsharabayko maxsharabayko added this to the v1.4.4 milestone Aug 26, 2021
@maxsharabayko maxsharabayko added [build] Area: Changes in build files Type: Bug Indicates an unexpected problem or unintended behavior labels Aug 26, 2021
@jlsantiago0
Copy link
Contributor Author

After removing the invalid and incorrect comment about the negative return of epoll_create1(), the patch should be good.

@jeandube
Copy link
Collaborator

@jlsantiago0 I can test build your PR. For glibc I need to verify.

@jeandube
Copy link
Collaborator

@jlsantiago0 Previous comment was aimed at PR#2104 :-)

@jlsantiago0 jlsantiago0 deleted the build-fix-glibc28 branch September 1, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants