J-Lentz / iwgtk

Lightweight wireless networking GUI (front-end for iwd)
GNU General Public License v3.0
223 stars 15 forks source link

error: unknown type name ‘uint8_t’; #3

Closed benkohler closed 4 years ago

benkohler commented 4 years ago

Not entirely sure why this builds on some platforms but not others, for me it seems to be missing an include:

make -j1 glib-compile-resources --target=src/icons.h --sourcedir=icons --generate-header icons.gresource.xml gcc -c pkg-config --cflags gtk+-3.0 -O3 -o main.o src/main.c In file included from src/iwgtk.h:118, from src/main.c:20: src/agent.h:40:34: error: unknown type name ‘uint8_t’; did you mean ‘u_int8_t’? 40 | void request_dialog(Agent *data, uint8_t request_type); | ^~~ | u_int8_t make: *** [Makefile:29: main.o] Error 1

benkohler commented 4 years ago

Patch like this seems to help

diff -ur a/src/iwgtk.h b/src/iwgtk.h --- a/src/iwgtk.h 2020-08-25 13:06:51.731245796 -0500 +++ b/src/iwgtk.h 2020-08-25 13:07:14.367618103 -0500 @@ -22,6 +22,7 @@

include <gtk/gtk.h>

include <gio/gio.h>

+#include

define VERSION_STRING "iwgtk 0.3"

J-Lentz commented 4 years ago

Fixed in the most recent commit, by using guint8 instead of uint8_t. My best guess is that the definition of uint8_t gets pulled in by the GLib/GTK headers on some platforms, but not on others.