diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-03-01 14:50:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-03-01 15:22:46 +0100 |
commit | a22ce8d5efdedb28dc4d05f33d011c48ded625ea (patch) | |
tree | 75d9228c48a9524c94972c8220018ddfcca0bd03 | |
parent | 02a5d7bf69687f0d881d67c7c5db4e3ddb194f99 (diff) | |
download | gnutls-a22ce8d5efdedb28dc4d05f33d011c48ded625ea.tar.gz |
Disable weak symbols for _gnutls_global_init_skip() under windows
That is to avoid an issue with running gnutls under windows;
that renders GNUTLS_SKIP_GLOBAL_INIT a no-op under windows.
Relates #74
-rw-r--r-- | lib/gnutls_global.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 9bda35209e..eafd29f460 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -1,5 +1,6 @@ /* - * Copyright (C) 2001-2013 Free Software Foundation, Inc. + * Copyright (C) 2001-2016 Free Software Foundation, Inc. + * Copyright (C) 2015-2016 Red Hat, Inc. * * Author: Nikos Mavrogiannopoulos * @@ -51,11 +52,18 @@ # define _DESTRUCTOR __attribute__((destructor)) #endif +#ifndef _WIN32 int __attribute__((weak)) _gnutls_global_init_skip(void); int _gnutls_global_init_skip(void) { return 0; } +#else +inline static int _gnutls_global_init_skip(void) +{ + return 0; +} +#endif /* created by asn1c */ extern const ASN1_ARRAY_TYPE gnutls_asn1_tab[]; |