Skip to content

Commit

Permalink
core: fix a #if vs #ifdef for constructor attribute support
Browse files Browse the repository at this point in the history
Unnoticed until now because these lines were added recently,
way after all compilers added support for this attribute...
until somebody tried autoconf with MSVC.

Thanks to Alexander Neumann for the report.

Closes #485

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Oct 22, 2021
1 parent 887b930 commit 9a03e30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hwloc/topology.c
Expand Up @@ -69,7 +69,7 @@
* it will break in cygwin, we'll have to use both putenv() and SetEnvironmentVariable().
* Hopefully L0 will be provide a way to enable Sysman without env vars before it happens.
*/
#ifdef HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR
#if HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR
static void hwloc_constructor(void) __attribute__((constructor));
static void hwloc_constructor(void)
{
Expand Down

0 comments on commit 9a03e30

Please sign in to comment.