litespeedtech / openlitespeed

Our high-performance, lightweight, open source HTTP server
https://openlitespeed.org
GNU General Public License v3.0
1.16k stars 189 forks source link

Compiling on macos reports errors #364

Closed xpf0000 closed 7 months ago

xpf0000 commented 1 year ago

error: httpsession.cpp:1140:31: error: use of undeclared identifier 'memrchr'; did you mean 'memchr'? p = (const char *)memrchr(pIpBegin, ',', pEnd - pIpBegin);

litespeedtech commented 1 year ago

MacOSX may not provide memrchr() in its libc. You may have to add code like https://opensource.apple.com/source/sudo/sudo-60/src/memrchr.c.auto.html

xpf0000 commented 1 year ago

Okay. Thanks for the reply.

I'm working on a php and web development environment management tool for macos. Currently it has both nginx and apache http servers integrated. I would also like to add the OpenLiteSpeed module. Both nginx and apache are installed via homebrew. Can OpenLiteSpeed be uploaded to homebrew?

I see that OpenLiteSpeed provides a pre-built version for linux, can a pre-built version for macos be released later and uploaded to homebrew?

rperper commented 7 months ago

memrchr() has been removed from OLS starting at release 1.8.

rperper commented 7 months ago

We have no plans for a MacOS binary for OpenLiteSpeed at this time. The release can be built from source.