aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-09-26 03:11:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-09-26 03:11:34 +0000
commit5abc10e1622bcb2a51558fc3845561b89f772333 (patch)
tree726201117927a4fae04c3bb48a7ca0d752f5918d
parent1dcee6d13b69278da5abb7d56425672b9cfe6c26 (diff)
fix "implicit declaration of function ‘strdup’" which causes problems on amd64 and ia64, and breaks in Debian packages
svn path=/trunk/externals/loaders/tclpd/; revision=16295
-rw-r--r--hashtable.h3
-rw-r--r--tcl_class.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/hashtable.h b/hashtable.h
index a45de35..06c1d3a 100644
--- a/hashtable.h
+++ b/hashtable.h
@@ -1,6 +1,9 @@
#ifndef HASHTABLE_H_INCLUDED
#define HASHTABLE_H_INCLUDED
+/* in order to get strdup(), this needs to be defined */
+#define _POSIX_C_SOURCE 200809L
+
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tcl_class.c b/tcl_class.c
index 085334a..412a1bb 100644
--- a/tcl_class.c
+++ b/tcl_class.c
@@ -1,3 +1,7 @@
+
+/* in order to get strdup(), this needs to be defined */
+#define _POSIX_C_SOURCE 200809L
+
#include "tclpd.h"
#include <stdlib.h>
#include <stdio.h>