net-snmp: fix PRIdPTR macro undefined error
authorWei-Ting Yang <[email protected]>
Tue, 22 Apr 2025 07:45:08 +0000 (15:45 +0800)
committerRobert Marko <[email protected]>
Wed, 23 Apr 2025 13:06:16 +0000 (15:06 +0200)
This commit includes inttypes.h to prevent the following error:

```
mibgroup/ieee802dot11.c: In function 'displayWiExt':
mibgroup/ieee802dot11.c:4563:26: error: expected ')' before 'PRIdPTR'
 4563 |     printf ( "%s sens: %" PRIdPTR "\n", "SIOCGIWSENS", *(intptr_t *)&info.sens );
      |            ~             ^~~~~~~~
      |                          )
mibgroup/ieee802dot11.c:31:1: note: 'PRIdPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?
   30 | #include "util_funcs/header_generic.h"
  +++ |+#include <inttypes.h>
   31 |
```

Signed-off-by: Wei-Ting Yang <[email protected]>
net/net-snmp/patches/750-ieee802dot11.patch

index 2eb598a82260b69bed437eef7770023972896d03..7bee514eba16154790c7b9b138361b6d4285bbc3 100644 (file)
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/agent/mibgroup/ieee802dot11.c
-@@ -0,0 +1,4916 @@
+@@ -0,0 +1,4917 @@
 +/****************************************************************************
 +*                                                                           *
 +*  File Name:           ieee802dot11.c                                      *
@@ -25,6 +25,7 @@
 +/****************************************************************************
 +*                               Includes                                    *
 +****************************************************************************/
++#include <inttypes.h>
 +#include <net-snmp/net-snmp-config.h>
 +#include <net-snmp/net-snmp-includes.h>
 +#include <net-snmp/agent/net-snmp-agent-includes.h>