Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util-common.c6
-rw-r--r--src/common/util-common.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/common/util-common.c b/src/common/util-common.c
index ab74e7c6..e8341688 100644
--- a/src/common/util-common.c
+++ b/src/common/util-common.c
@@ -1,7 +1,7 @@
/*
* util-common.c
*
- * Copyright (c) 2006-2014 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -127,7 +127,7 @@ char *safe_fgets(char *s, int size, FILE *stream)
return ret;
}
-#ifndef HAVE_STRNDUP
+#ifndef HAVE_STRNLEN
/* A quick and dirty implementation derived from glibc */
/** Determines the length of a fixed-size string.
* @param s string to be measured
@@ -140,7 +140,9 @@ static size_t strnlen(const char *s, size_t max)
for(p = s; *p && max--; ++p);
return (p - s);
}
+#endif
+#ifndef HAVE_STRNDUP
/** Copies a string.
* Returned string needs to be freed
* @param s string to be copied
diff --git a/src/common/util-common.h b/src/common/util-common.h
index ca8db5ab..a2093bef 100644
--- a/src/common/util-common.h
+++ b/src/common/util-common.h
@@ -1,7 +1,7 @@
/*
* util-common.h
*
- * Copyright (c) 2006-2014 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by