Skip to content

Conversation

SirGamsay
Copy link
Contributor

Hello. I was having an Issue with the newest Release, where the Compiler would complain when compiling my personal Project, when I was using this libary. The compiler gives me the following Error

In file included from /home/meiko/repos/openvpn-client-private/src/utils/vpnManager.c:1:
/usr/local/include/slog.h:101:44: error: unknown type name ‘size_t’
  101 | typedef int (*slog_cb_t)(const char *pLog, size_t nLength, slog_flag_t eFlag,
      |                                            ^~~~~~
/usr/local/include/slog.h:33:1: note: ‘size_t’ is defined in header ‘<stddef.h>; did you forget to ‘#include <stddef.h>’?
   32 | #include <inttypes.h>
  +++ |+#include <stddef.h>
   33 | #include <stdint.h>
/usr/local/include/slog.h:162:5: error: unknown type name ‘slog_cb_t’
  162 |     slog_cb_t logCallback;         // Log callback to collect logs
      |     ^~~~~~~~~
/usr/local/include/slog.h:185:24: error: unknown type name ‘slog_cb_t’; did you mean ‘slog_flag_t’?
  185 | void slog_callback_set(slog_cb_t callback, void *pContext);
      |                        ^~~~~~~~~
      |                        slog_flag_t

To my luck the compiler also gives me the solution. Just adding #include <stddef.h> fixed it for me. So I just applied this simple fix.

@kala13x kala13x merged commit e7d5d7e into kala13x:master Mar 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants