Files
nixpkgs/pkgs/by-name/fl/flmsg/add-missing-pthread-include.patch
KangaZero f472fcf419 flsmg: 4.0.23 -> 4.0.24
Added `versionCheckHook`
Added `patches` to include missing header file `pthread.h`. Without it
the build will fail with:
  > widgets/font_browser.cxx: In function 'void find_fonts()':
       > widgets/font_browser.cxx:391:13: error: 'pthread_create' was not de
       >   391 |         if (pthread_create(&find_font_thread, NULL, find_fi
       >       |             ^~~~~~~~~~~~~~
       >       |             pthread_t
       > make[2]: *** [Makefile:3513: widgets/flmsg-font_browser.o] Error 1
2026-08-14 12:37:27 +09:00

14 lines
503 B
Diff

font_browser.cxx uses pthread_create and pthread_t, but never includes <pthread.h>
The header is likely pulled from a different header that includes it; however, on stricter/newer compilers it will fail (It needs the header to be explicity included in the file it is called in)
--- a/src/widgets/font_browser.cxx
+++ b/src/widgets/font_browser.cxx
@@ -33,6 +33,7 @@
#include <string>
#include <cstdio>
#include <stdint.h>
+#include <pthread.h>
#include <FL/Fl.H>
#include <FL/Fl_Color_Chooser.H>