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

config-mac: define HAVE_SYS_IOCTL_H #10042

Closed
wants to merge 1 commit into from

Conversation

ryandesign
Copy link
Contributor

@ryandesign ryandesign commented Dec 6, 2022

Define HAVE_SYS_FILIO_H in config-mac.h and include <sys/filio.h> in nonblock.c when HAVE_SYS_FILIO_H is defined.

Define HAVE_SYS_IOCTL_H in config-mac.h. This is needed to compile nonblock.c on classic Mac OS with GUSI because nonblock.c uses FIONBIO which is defined in <sys/filio.h> which is included by <sys/ioctl.h>.

lib/config-mac.h Outdated
@@ -53,6 +53,7 @@
#define HAVE_UTIME_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_SYS_FILIO_H 1
Copy link
Member

Choose a reason for hiding this comment

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

Daft question since I don't know Mac OS other than as a user (a long time ago..). Is filio.h available on all versions of Mac OS on which it would be feasible to build libcurl? In other words, does it go further back than OS9?

Disclaimer: I'm mainly curious, I don't think it's a problem to define this if it doesn't

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Classic Mac OS does not have filio.h or other Unix headers. To build curl on classic Mac OS, the Grand Unified Socket Interface (GUSI) is required. It provides an early 2000s Unix-like socket and threads interface for classic Mac OS. It is compatible with System 7, Mac OS 8, and Mac OS 9.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha, thanks.

lib/nonblock.c Outdated Show resolved Hide resolved
@ryandesign ryandesign marked this pull request as draft December 6, 2022 23:09
Define HAVE_SYS_IOCTL_H in config-mac.h. This is needed to compile
nonblock.c on classic Mac OS with GUSI because nonblock.c uses FIONBIO
which is defined in <sys/filio.h> which is included by <sys/ioctl.h>.
@ryandesign ryandesign changed the title Define HAVE_SYS_FILIO_H in config-mac.h; include <sys/filio.h> in nonblock.c config-mac: define HAVE_SYS_IOCTL_H Dec 7, 2022
@ryandesign ryandesign marked this pull request as ready for review December 7, 2022 12:51
@jay jay closed this in 33f1f4f Dec 7, 2022
@jay
Copy link
Member

jay commented Dec 7, 2022

Thanks

@ryandesign ryandesign deleted the ryandesign-sys-filio.h branch December 7, 2022 21:49
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

3 participants