Skip to contentSkip to conversation

safe_macros: Include errno.h.

PATCH In review Vinson Lee 3 participants 3 messages Feb 10, 2012 Library code

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 safe_macros: Include errno.h.

Fix build regression introduced by commit
d6a1f25137b0ac8704bd08cc4bc8af01cceaca0e.

This patch fixes this build error on Ubuntu 11.10. safe_macros.c: In function ‘safe_strtol’:
safe_macros.c:349:2: error: ‘errno’ undeclared (first use in this function)
safe_macros.c:349:2: note: each undeclared identifier is reported only once for each function it appears in
safe_macros.c:351:16: error: ‘ERANGE’ undeclared (first use in this function)

---
 lib/safe_macros.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/safe_macros.c +1 -0
index 4c8cbb7..31df0fd 100644
@@ -2,6 +2,7 @@
 #include <sys/mman.h>
 #include <sys/resource.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <libgen.h>
 #include <limits.h>
Signature · 12 lines
1.7.5.4


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 22 lines · Vinson Lee

Fix build regression introduced by commit
d6a1f25137b0ac8704bd08cc4bc8af01cceaca0e.

This patch fixes this build error on Ubuntu 11.10. safe_macros.c: In function ‘safe_strtol’:
safe_macros.c:349:2: error: ‘errno’ undeclared (first use in this function)
safe_macros.c:349:2: note: each undeclared identifier is reported only once for each function it appears in
safe_macros.c:351:16: error: ‘ERANGE’ undeclared (first use in this function)

---
 lib/safe_macros.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/safe_macros.c +0 -0
index 4c8cbb7..31df0fd 100644

lib/safe_macros.c line 8

Quoted 7 lines
lib/safe_macros.c +1 -0
@@ -2,6 +2,7 @@
 #include <sys/mman.h>
 #include <sys/resource.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <libgen.h>
 #include <limits.h>

ACK this.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
In reply to Vinson Lee
Quoted 11 lines · Vinson Lee

Fix build regression introduced by commit
d6a1f25137b0ac8704bd08cc4bc8af01cceaca0e.

This patch fixes this build error on Ubuntu 11.10. safe_macros.c: In function ‘safe_strtol’:
safe_macros.c:349:2: error: ‘errno’ undeclared (first use in this function)
safe_macros.c:349:2: note: each undeclared identifier is reported only once for each function it appears in
safe_macros.c:351:16: error: ‘ERANGE’ undeclared (first use in this function)

Hi Committed, thanks.

Caspar

Quoted 11 lines
---
 lib/safe_macros.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/safe_macros.c +0 -0
index 4c8cbb7..31df0fd 100644

lib/safe_macros.c line 8

Quoted 7 lines
lib/safe_macros.c +1 -0
@@ -2,6 +2,7 @@
 #include <sys/mman.h>
 #include <sys/resource.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <libgen.h>
 #include <limits.h>

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list