From: Enrico Scholz Date: Fri, 26 Dec 2003 00:22:16 +0000 (+0000) Subject: added workarounds for non-C99 compilers X-Git-Tag: VERSION_0_10~1040 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0ae91f088249a5c126ad170b82a8fc6e669b95f;p=util-vserver.git added workarounds for non-C99 compilers git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@475 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/lib/getvserverbyctx.c b/util-vserver/lib/getvserverbyctx.c index 5c0be0a..6205e50 100644 --- a/util-vserver/lib/getvserverbyctx.c +++ b/util-vserver/lib/getvserverbyctx.c @@ -23,6 +23,7 @@ #include "vserver.h" #include "internal.h" #include "pathconfig.h" +#include "compat-c99.h" #include #include @@ -32,6 +33,7 @@ vc_getVserverByCtx(ctx_t ctx, vcCfgStyle *style, char const *revdir) { if (revdir==0) revdir = DEFAULT_PKGSTATEREVDIR; + BS; vcCfgStyle cur_style = vcCFG_NONE; size_t l = strlen(revdir); size_t l1; @@ -61,4 +63,5 @@ vc_getVserverByCtx(ctx_t ctx, vcCfgStyle *style, char const *revdir) default : return 0; } + BE; } diff --git a/util-vserver/lib/getvserverctx.c b/util-vserver/lib/getvserverctx.c index b963a02..3052c7a 100644 --- a/util-vserver/lib/getvserverctx.c +++ b/util-vserver/lib/getvserverctx.c @@ -22,6 +22,7 @@ #include "vserver.h" #include "pathconfig.h" +#include "compat-c99.h" #include #include @@ -43,18 +44,20 @@ getCtxFromFile(char const *pathname) (len>50) || (lseek(fd, 0, SEEK_SET)==-1)) return VC_NOCTX; - - char buf[len+1]; - if (TEMP_FAILURE_RETRY(read(fd, buf, len+1))!=len) - return VC_NOCTX; + BS; + char buf[len+1]; char *errptr; ctx_t res; + + if (TEMP_FAILURE_RETRY(read(fd, buf, len+1))!=len) + return VC_NOCTX; res = strtol(buf, &errptr, 10); if (*errptr!='\0' && *errptr!='\n') return VC_NOCTX; return res; + BE; } ctx_t