Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added missing Import stddef.h #26

Merged
merged 1 commit into from
Mar 2, 2025
Merged

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants