Skip to content

Commit 0d845e4

Browse files
committed
merge revision(s) 361644c: [Backport #21917]
[PATCH] [Bug #21917] Fix build on AIX
1 parent 8466e93 commit 0d845e4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

dln.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ dln_open(const char *file)
348348
void *handle;
349349

350350
#if defined(_WIN32)
351+
# define DLN_DEFINED
351352
char message[1024];
352353

353354
/* Convert the file path to wide char */
@@ -374,6 +375,7 @@ dln_open(const char *file)
374375
# endif
375376

376377
#elif defined(USE_DLN_DLOPEN)
378+
# define DLN_DEFINED
377379

378380
# ifndef RTLD_LAZY
379381
# define RTLD_LAZY 1
@@ -505,7 +507,7 @@ abi_check_enabled_p(void)
505507
static void *
506508
dln_load_and_init(const char *file, const char *init_fct_name)
507509
{
508-
#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
510+
#if defined(DLN_DEFINED)
509511
void *handle = dln_open(file);
510512

511513
#ifdef RUBY_DLN_CHECK_ABI
@@ -523,6 +525,7 @@ dln_load_and_init(const char *file, const char *init_fct_name)
523525
return handle;
524526

525527
#elif defined(_AIX)
528+
# define DLN_DEFINED
526529
{
527530
void (*init_fct)(void);
528531

@@ -560,7 +563,7 @@ dln_load(const char *file)
560563
void *
561564
dln_load_feature(const char *file, const char *fname)
562565
{
563-
#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
566+
#if defined(DLN_DEFINED)
564567
char *init_fct_name;
565568
init_funcname(&init_fct_name, fname);
566569
return dln_load_and_init(file, init_fct_name);

0 commit comments

Comments
 (0)