1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 12:45:20 +03:00
aports/community/hermes/Utils.cpp.patch
ScrumpyJack fad1905195 testing/[various]: move to community
Moves the following packages to community after successful build and testing.

bogofilter
corebird
fbpanel
hermes
libdbi-drivers
luufs
netsurf
opencpn
py-sensehat
rng-tools
volumeicon
2016-08-18 21:11:39 +00:00

19 lines
448 B
Diff

--- hermes-1.9/src/Utils.cpp
+++ ../Utils.cpp.modified
@@ -418,9 +418,15 @@
{
char buf[2048]="";
char *strerr;
-// if(strerror_r(errnum,strerr,1024)!=-1)
#ifndef WIN32
+ #ifdef __GLIBC__
strerr=strerror_r(errnum,buf,2048);
+ #else
+ int retval = strerror_r(errnum, buf, sizeof buf);
+ strerr = buf;
+ if(retval != 0)
+ strcpy(buf, "error fetching error description");
+ #endif
#else
strerr="Error ";
#endif //WIN32