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

Add OSSockOpt constants added by Linux 5.1 kernel #3515

Merged
merged 1 commit into from
Apr 21, 2020
Merged

Conversation

slfritchie
Copy link
Contributor

@slfritchie slfritchie commented Apr 21, 2020

Add SO_RCVTIMEO_OLD, SO_RCVTIMEO_NEW, SO_SNDTIMEO_OLD, & SO_SNDTIMEO_NEW, which were added to the Linux kernel 5.1, see #3498.

Fixes #3498

Using this test program:

use "net"

actor Main
  new create(env: Env) =>
    @printf[I32]("so_rcvtimeo = %d\n".cstring(), OSSockOpt.so_rcvtimeo())
    @printf[I32]("so_rcvtimeo_old = %d\n".cstring(), OSSockOpt.so_rcvtimeo_old())
    @printf[I32]("so_rcvtimeo_new = %d\n".cstring(), OSSockOpt.so_rcvtimeo_new())
    @printf[I32]("so_sndtimeo = %d\n".cstring(), OSSockOpt.so_sndtimeo())
    @printf[I32]("so_sndtimeo_old = %d\n".cstring(), OSSockOpt.so_sndtimeo_old())
    @printf[I32]("so_sndtimeo_new = %d\n".cstring(), OSSockOpt.so_sndtimeo_new())

... I get the following output on an Ubuntu 19.10 x86-64 VM with a Linux 5.3.0-46-generic kernel.

so_rcvtimeo = 20
so_rcvtimeo_old = 20
so_rcvtimeo_new = 66
so_sndtimeo = 21
so_sndtimeo_old = 21
so_sndtimeo_new = 67

@slfritchie slfritchie added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Apr 21, 2020
@SeanTAllen
Copy link
Member

@slfritchie can you give the PR a more CHANGELOG friendly name?

@slfritchie
Copy link
Contributor Author

Is the changelog bot back in use? (Sorry, I ought to know the answer but don't.)

Also, what's up with x86-64-unknown-linux-musl ?

@slfritchie slfritchie changed the title OSSockOpt: add SO_RCVTIMEO_OLD, SO_RCVTIMEO_NEW, ... Add OSSockOpt constants added by Linux 5.1 kernel Apr 21, 2020
@SeanTAllen
Copy link
Member

@slfritchie known issue. i'm working on fixing it. clang is missing a dependency. we just switched to clang as our CI c compiler from gcc.

@SeanTAllen
Copy link
Member

@slfritchie if you rebase against master, you'll be good.

@SeanTAllen
Copy link
Member

@slfritchie is this a FIXED or an ADDED? Seems more like an ADDED.

@slfritchie slfritchie added changelog - added Automatically add "Added" CHANGELOG entry on merge and removed changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge labels Apr 21, 2020
@slfritchie
Copy link
Contributor Author

@J0WI I think that this PR will take care of the problem that you'd reported in #3498. Please let us know if you have any problems with it.

@SeanTAllen SeanTAllen merged commit 5c77add into master Apr 21, 2020
@SeanTAllen SeanTAllen deleted the gh3498 branch April 21, 2020 22:03
github-actions bot pushed a commit that referenced this pull request Apr 21, 2020
@J0WI
Copy link

J0WI commented Apr 21, 2020

@J0WI I think that this PR will take care of the problem that you'd reported in #3498. Please let us know if you have any problems with it.

I'm still seeing the same error using ponyc 0.33.2 with this patch.

@SeanTAllen
Copy link
Member

@J0WI can you try building master from source and let us know if you have an issue with it?

@J0WI
Copy link

J0WI commented Apr 21, 2020

The switch to cmake in master breaks my current setup. You should be able to reproduce when using an alpine:edge builder here (I tried to demonstrate this in #3518):

edge uses Linux 5.4 while 3.11 uses Linux 4.19.

Make sure to use LLVM 9, I had other issues with version 10.

You can find the current workaround here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - added Automatically add "Added" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename SO_{RCV,SND}TIMEO for Linux 5.1
3 participants