webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.95k stars 171 forks source link

Fix compiling with swift due to incompatible civetweb structname #416

Closed ttytm closed 3 months ago

ttytm commented 3 months ago

The structname ah is hindering compilation with swift on macos. A fix can be achieved through a simple rename.

I will also make this proposal over at civetweb, as I think the longer name is a better struct name, while ah works well for a variable. Though idk if and how long it will take for it to get merged.

hassandraga commented 3 months ago

The structname ah is hindering compilation with swift on macos.

You mean warnings or errors?

ttytm commented 3 months ago

Errors. It's not possible to use swift-webui with this struct in civetweb. In the CI of swift-webui continue-on-error is enabled for macos. Checking the build step, the failure is still visible. Ref.: https://github.com/webui-dev/swift-webui/actions/runs/9525013964

One way to verify the fix locally is by cloning the swift-webui repo as it's described in the readme. Then trying to build it on macos and encountering the failure. Applying this change to Sources/webui/src/civetweb.c and trying to building it again.

fernandolguevara commented 3 months ago

@hassandraga on macos struct ah is colliding with Darwin.netinet6.ah

hassandraga commented 3 months ago

Sounds good, Thank you @ttytm and @fernandolguevara for the clarification.

ttytm commented 3 months ago

Thanks @fernandolguevara.

The PR at civetweb is open, though the repo is inactive atm.

I'll extend the description with your provided info and ping the author, maybe we'll have and upstream fix soon then as it's a trivial one.