Open sonicdebris opened 1 year ago
Building on ubuntu 22.04 requires a trivial fix due to some changes in the libmicrohttpd version available for installation through apt-get.
It's about an int argument being replaced with an enum, the full diff of the changes that fix the issue is here:
int
@@ -103,7 +103,7 @@ static void endRequest (void *cls, struct MHD_Connection *connection, void **con // process rest API query -STATIC int requestApi (struct MHD_Connection *connection, AJG_session *session, const char *method, const char* url +STATIC enum MHD_Result requestApi (struct MHD_Connection *connection, AJG_session *session, const char *method, const char* url , const char *upload_data, size_t *upload_data_size, void **con_cls) { const char *query, *param; json_object *cmd; @@ -333,7 +333,7 @@ STATIC void computeEtag (char *etag, int maxlen, struct stat *sbuf) { } // minimal httpd file server for static HTML,JS,CSS,etc... -STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) { +STATIC enum MHD_Result requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) { int fd; int ret; struct stat sbuf; @@ -414,7 +414,7 @@ STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session, return ret; } -STATIC int newRequest (void *cls, +STATIC enum MHD_Result newRequest (void *cls, struct MHD_Connection *connection, const char *url, const char *method, @@ -435,7 +435,7 @@ STATIC int newRequest (void *cls, } -STATIC int newClient (void *cls, const struct sockaddr * addr, socklen_t addrlen) { +STATIC enum MHD_Result newClient (void *cls, const struct sockaddr * addr, socklen_t addrlen) { // check if client is comming from an acceptable IP return (MHD_YES); // MHD_NO } // minimal httpd file server for static HTML,JS,CSS,etc... -STATIC int requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) { +STATIC enum MHD_Result requestFile (struct MHD_Connection *connection, AJG_session *session, const char* url) {
I could open a PR if the changes are ok.
Please send a PR and I will merge it.
Building on ubuntu 22.04 requires a trivial fix due to some changes in the libmicrohttpd version available for installation through apt-get.
It's about an
int
argument being replaced with an enum, the full diff of the changes that fix the issue is here:I could open a PR if the changes are ok.