Skip to content

Commit

Permalink
minor: Fix mongoose build without threads (#2291)
Browse files Browse the repository at this point in the history
Fix the following build failure without threads:

In file included from /home/buildroot/autobuild/instance-3/output-1/build/rtl_433-22.11/src/data_tag.c:17:
/home/buildroot/autobuild/instance-3/output-1/build/rtl_433-22.11/include/mongoose.h:407:10: fatal error: pthread.h: No such file or directory
  407 | #include <pthread.h>
      |          ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/9f1677fc5a4568be0b9c121060c5d821ac2ae21b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine authored and zuckschwerdt committed Dec 27, 2022
1 parent b860de9 commit 707b51e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/mongoose.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ unsigned int sleep(unsigned int seconds);
#include <math.h>
#include <netdb.h>
#include <netinet/in.h>
#include <pthread.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
Expand Down Expand Up @@ -4658,6 +4657,7 @@ size_t mg_fwrite(const void *ptr, size_t size, size_t count, FILE *f);
#endif /* MG_ENABLE_FILESYSTEM */

#if MG_ENABLE_THREADS
#include <pthread.h>
/*
* Starts a new detached thread.
* Arguments and semantics are the same as pthead's `pthread_create()`.
Expand Down

0 comments on commit 707b51e

Please sign in to comment.