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

x/sys/unix: F_OK removed with OpenBSD 6.3 amd64 update #26593

Closed
mpx opened this issue Jul 25, 2018 · 2 comments
Closed

x/sys/unix: F_OK removed with OpenBSD 6.3 amd64 update #26593

mpx opened this issue Jul 25, 2018 · 2 comments

Comments

@mpx
Copy link
Contributor

mpx commented Jul 25, 2018

The OpenBSD 6.3 rebuild for amd64 (golang/sys@7f59abf) incorrectly removed F_OK (used by access(2)). I'm not sure if all the other changes were correct or not.

@FiloSottile @tklauser

@gopherbot gopherbot added this to the Unreleased milestone Jul 25, 2018
@gopherbot
Copy link

Change https://golang.org/cl/126635 mentions this issue: unix: fix openbsd/amd64 codegen to include F_OK

@mpx
Copy link
Contributor Author

mpx commented Jul 28, 2018

I've reviewed all the that were removed in the openbsd/amd64 generated code from golang/sys@7f59abf to master.

It looks like F_OK is the only symbol that was removed that should still be present. Most of the remaining symbols are no longer found under /usr/include/... in OpenBSD 6.3, and a few are not part of the userspace API.

F_OK is defined in sys/unistd.h. I suspect it was implicitly included as a dependency when the code was generated ages ago, but this is no longer the case after OS/compiler header changes. I haven't installed/reviewed old OpenBSD versions to confirm if this is possible, but it's my best guess.

The above CL adds sys/unistd.h to the list of headers which then fixes the code generation.

Status of OpenBSD/amd64 unix package symbols in OpenBSD 6.3:

F_OK                     // Present in sys/unistd.h (used by access(2)).
IFA_ROUTE                // Present in net/if_var.h (kernel only).
IFF_NOTRAILERS           // Removed. Value reused for IFF_STATICARP.
IPPROTO_DIVERT_INIT      // Removed. 
IPPROTO_DIVERT_RESP      // Removed. 
IP_DIVERTFL              // Removed.
MAP_INHERIT_DONATE_COPY  // Removed. Value reused for MAP_INHERIT_ZERO.
RTF_MASK                 // Removed. 
RTF_SOURCE               // Removed.
RTF_TUNNEL               // Removed.
RTF_XRESOLVE             // Removed. Value reused for RTF_MULTICAST.
SIOCALIFADDR             // Removed. 
SIOCBRDGGSIFS            // Removed.
SIOCDLIFADDR             // Removed. 
SIOCGHIWAT               // Removed. 
SIOCGIFASYNCMAP          // Removed. 
SIOCGIFPDSTADDR          // Removed. 
SIOCGIFPSRCADDR          // Removed. 
SIOCGIFTIMESLOT          // Removed. 
SIOCGLIFADDR             // Removed. 
SIOCGLOWAT               // Removed. 
SIOCSHIWAT               // Removed. 
SIOCSIFASYNCMAP          // Removed. 
SIOCSIFPHYADDR           // Removed. 
SIOCSIFTIMESLOT          // Removed. 
SIOCSLOWAT               // Removed. 
SYS_GETLOGIN             // Removed. Replaced with SYS_GETLOGIN_R.
SYS___SYSCTL             // Removed. Replaced with SYS_SYSCTL.
TCP_NSTATES              // Present in netinet/tcp_fsm.h (kernel only).
WSTOPPED                 // Removed (now _WSTOPPED).

@golang golang locked and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants