summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librabbitmq/amqp_api.c6
-rw-r--r--librabbitmq/unix/socket.c6
-rw-r--r--librabbitmq/utils/strdup.h10
-rw-r--r--librabbitmq/windows/socket.c6
4 files changed, 6 insertions, 22 deletions
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index e35fa2d..d3baf5a 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -48,6 +48,8 @@
* ***** END LICENSE BLOCK *****
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -58,10 +60,6 @@
#include "amqp_framing.h"
#include "amqp_private.h"
-#ifndef _GNU_SOURCE
-#include "utils/strdup.h"
-#endif
-
#include <assert.h>
static const char *client_error_strings[ERROR_MAX] = {
diff --git a/librabbitmq/unix/socket.c b/librabbitmq/unix/socket.c
index 1edc52f..b8f0b4e 100644
--- a/librabbitmq/unix/socket.c
+++ b/librabbitmq/unix/socket.c
@@ -48,6 +48,8 @@
* ***** END LICENSE BLOCK *****
*/
+#include "config.h"
+
#include <sys/socket.h>
#include <unistd.h>
#include <fcntl.h>
@@ -59,10 +61,6 @@
#include "amqp_private.h"
#include "socket.h"
-#ifndef _GNU_SOURCE
-#include "utils/strdup.h"
-#endif
-
int amqp_socket_socket(int domain, int type, int proto)
{
int flags;
diff --git a/librabbitmq/utils/strdup.h b/librabbitmq/utils/strdup.h
deleted file mode 100644
index 4478cbd..0000000
--- a/librabbitmq/utils/strdup.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef librabbitmq_strdup_h
-#define librabbitmq_strdup_h
-/* strdup is not in ISO C90!
- * we define it here for easy inclusion
- */
-static inline char *strdup(const char *str)
-{
- return strcpy(malloc(strlen(str) + 1),str);
-}
-#endif
diff --git a/librabbitmq/windows/socket.c b/librabbitmq/windows/socket.c
index 57914b1..0133a8c 100644
--- a/librabbitmq/windows/socket.c
+++ b/librabbitmq/windows/socket.c
@@ -51,6 +51,8 @@
/* See http://msdn.microsoft.com/en-us/library/ms737629%28VS.85%29.aspx */
#define WIN32_LEAN_AND_MEAN
+#include "config.h"
+
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
@@ -59,10 +61,6 @@
#include "amqp_private.h"
#include "socket.h"
-#ifndef _GNU_SOURCE
-#include "utils/strdup.h"
-#endif
-
static int called_wsastartup;
int amqp_socket_init(void)