summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortnn <tnn>2007-04-28 21:25:06 +0000
committertnn <tnn>2007-04-28 21:25:06 +0000
commit6605dfd6ee47e39cad03a09c019f145f7dfa7768 (patch)
treeaaf4f7c6b635b459ff2886b1f979db88928ea82a /pkgtools
parent5f80fdbce1e50d77d14f0c4e8032653b41fff779 (diff)
downloadpkgsrc-6605dfd6ee47e39cad03a09c019f145f7dfa7768.tar.gz
typecast return value from malloc
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/posix_headers/files/stdlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgtools/posix_headers/files/stdlib.h b/pkgtools/posix_headers/files/stdlib.h
index 49939b6c9f5..edc4fb54cfb 100644
--- a/pkgtools/posix_headers/files/stdlib.h
+++ b/pkgtools/posix_headers/files/stdlib.h
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.1 2007/04/28 21:03:56 tnn Exp $ */
+/* $NetBSD: stdlib.h,v 1.2 2007/04/28 21:25:06 tnn Exp $ */
#ifndef _PKGSRC_STDLIB_H_
#define _PKGSRC_STDLIB_H_
#include "@REAL_HEADER@"
@@ -15,7 +15,7 @@ static __inline int setenv(const char *name, const char *value, int overwrite) {
char *c;
int ret;
if (!overwrite && getenv(name)) return(-1);
- c = malloc(strlen(name)+strlen(value)+2);
+ c = (char*)malloc(strlen(name)+strlen(value)+2);
if(!c) return(-1);
sprintf(c, "%s=%s", name, value);
ret = putenv(c);