Skip to contentSkip to conversation

wakeup_xxx.h: include limits.h

PATCH In review Fabrice Fontaine 2 participants 3 messages May 20, 2019 – Jul 2, 2019

lore
Share & tools
lore

Fabrice Fontaine

author
#0 lore raw

PATCH 1/1 wakeup_xxx.h: include limits.h

limits.h must be included to define PATH_MAX otherwise build will fail on:

In file included from wakeup/wakeup_ethernet.cpp:45:0:
wakeup/wakeup_ethernet.h:35:16: error: 'PATH_MAX' was not declared in this scope
char eth_path[PATH_MAX];

In file included from wakeup/wakeup_usb.cpp:45:0:
wakeup/wakeup_usb.h:35:16: error: 'PATH_MAX' was not declared in this scope
char usb_path[PATH_MAX];

Fixes:
- http://autobuild.buildroot.org/results/a0b3337cf4a827e6566f8b15b6bb180f0dcef7a3

Signed-off-by Fabrice Fontaine <fontaine.fabrice(a)gmail.com>
---
 src/wakeup/wakeup_ethernet.h | 1 +
 src/wakeup/wakeup_usb.h      | 1 +
 2 files changed, 2 insertions(+)
src/wakeup/wakeup_ethernet.h +1 -0
index 682bf95..e0fa628 100644
@@ -25,6 +25,7 @@
 #ifndef _INCLUDE_GUARD_ETHERNET_WAKEUP_H
 #define _INCLUDE_GUARD_ETHERNET_WAKEUP_H
 
+#include <limits.h>
 #include <vector>
 
 #include "wakeup.h"
src/wakeup/wakeup_usb.h +1 -0
index f7a1f7e..15898e3 100644
@@ -25,6 +25,7 @@
 #ifndef _INCLUDE_GUARD_USB_WAKEUP_H
 #define _INCLUDE_GUARD_USB_WAKEUP_H
 
+#include <limits.h>
 #include <vector>
 
 #include "wakeup.h"
Signature · 1 line
2.20.1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: PowerTop [mailto:powertop-bounces(a)lists.01.org] On Behalf Of Fabrice Fontaine
Sent: Monday, May 20, 2019 11:44 AM
To: powertop(a)lists.01.org
Subject: [Powertop] [PATCH] wakeup_xxx.h: include limits.h

limits.h must be included to define PATH_MAX otherwise build will fail on:

Sorry for my delayed response. Thanks for the patch! Perhaps it makes more sense to include limits.h file in wakeup.h as we included wakeup.h in both wakeup_ethernet.h and wakeup_usb.h files.

Thanks,
Gayatri

author
#2 lore raw

Dear Gayatri,

Quoted 8 lines · Gayatri
Quoted 8 lines

-----Original Message-----
From: PowerTop [mailto:powertop-bounces(a)lists.01.org] On Behalf Of Fabrice Fontaine
Sent: Monday, May 20, 2019 11:44 AM
To: powertop(a)lists.01.org
Subject: [Powertop] [PATCH] wakeup_xxx.h: include limits.h

Quoted 4 lines
Quoted 3 lines

limits.h must be included to define PATH_MAX otherwise build will fail on:

Sorry for my delayed response. Thanks for the patch! Perhaps it makes more sense to include limits.h file in wakeup.h as we included wakeup.h in both wakeup_ethernet.h and wakeup_usb.h files.

Indeed, this is also acceptable.

Quoted 4 lines

Thanks,
Gayatri

Best Regards,

Fabrice