]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
several windows compilation fixes
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 31 Jul 2014 10:18:16 +0000 (12:18 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 31 Jul 2014 10:18:16 +0000 (12:18 +0200)
lib/atfork.h
lib/nettle/rnd-common.c
lib/system.h
lib/x509/verify-high2.c

index cf299ab636b242ab654235809881a6ed228ad80a..dfb682bd90ac10d39571d0e9b73b82ed0f7d7ccf 100644 (file)
@@ -68,7 +68,7 @@ unsigned _gnutls_fork_detected(unsigned int *v)
 # endif
 
 #else /* _WIN32 */
-# define _gnutls_fork_set_val() 0
+# define _gnutls_fork_set_val(x) 0
 # define _gnutls_register_fork_handler() 0
 # define _gnutls_fork_detected(x) 0
 #endif
index 3bdfdbd8b5b8f02ec19df9f2aec8014a3db07526..0a015d5aa065cc0771151ee3e5f0ab664dd0882e 100644 (file)
@@ -80,6 +80,7 @@ void _rnd_get_event(struct event_st *e)
 
 static HCRYPTPROV device_fd = 0;
 
+static
 int _rnd_get_system_entropy_win32(void* rnd, size_t size)
 {
        if (!CryptGenRandom(device_fd, (DWORD) size, rnd)) {
index 0e7bcfbcc8b169e0b1e979d9c5a9f69f3a23c022..0a7350e444594a3754cbec2966060c784ad15cd3 100644 (file)
@@ -98,8 +98,9 @@ int _gnutls_ucs2_to_utf8(const void *data, size_t size,
 int gnutls_system_global_init(void);
 void gnutls_system_global_deinit(void);
 
-#include <arpa/inet.h>
-#ifdef _WIN32
+#ifndef _WIN32
+# include <arpa/inet.h>
+#else
 # define inet_aton _gnutls_inet_aton
 int inet_aton(const char *cp, struct in_addr *inp);
 #endif
index ec55f385e3be71e1aa6c5fa0fc30ab30fbe78ae9..fd90a99c053ec9b8520a53ac1331e35a3bcb1686 100644 (file)
@@ -304,7 +304,11 @@ int load_dir_certs(const char *dirname,
        if (dirp != NULL) {
                do {
                        d = readdir(dirp);
-                       if (d != NULL && d->d_type == DT_REG) {
+                       if (d != NULL
+#ifndef _WIN32
+                               && d->d_type == DT_REG
+#endif
+                               ) {
                                snprintf(path, sizeof(path), "%s/%s",
                                         dirname, d->d_name);