Closed mrdsam closed 9 months ago
It should be, struct option
and friends are part of libc
(on my linux at least) and included via "unistd.h"
ok, I can reproduce this on FreeBSD, but I don't know why (it happens)
Hi RincewindsHat, thanks for the hint. I solved it by adding "getopt.h" to check_interfaces.c
index 622bdad..f93637c 100644
--- a/check_interfaces.c
+++ b/check_interfaces.c
@@ -1,3 +1,4 @@
+#include <getopt.h>
#include "snmp_bulkget.h"
#include "utils.h"
#include <net-snmp/net-snmp-config.h>
It has to be at the top of all includes, don't ask me why. Although I'm happy it complies & runs now, I'd like to understand what's going on. Does FreeBSD have a different unistd.h?
I followed this hint, w/o really understanding what I'm doing: https://stackoverflow.com/questions/23382023/error-with-struct-option-array-type-has-incomplete-element-type
I despaired yesterday after adding it as last ...... Thank you.
Thank you very much for the fast fix, works w/o problems now.
Ask a question
Is it possible to compile current origin/master on FreeBSD 13.2? I get the following error. Any ideas? Version 1.4 works without problems.