Skip to content

Commit

Permalink
global.h: move __STRING() macro outside !PIC ifdef block
Browse files Browse the repository at this point in the history
It solves the musl libc compilation issue.

control.c: In function 'snd_ctl_open_conf':
../../include/global.h:98:36: warning: implicit declaration of function '__STRING' [-Wimplicit-function-declaratio]
   98 | #define SND_DLSYM_VERSION(version) __STRING(version)
      |                                    ^~~~~~~~

Fixes: #350
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
perexg committed Sep 6, 2023
1 parent fcce13a commit 10bd599
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void);
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif

#ifndef __STRING
/** \brief Return 'x' argument as string */
#define __STRING(x) #x
#endif

#ifdef PIC /* dynamic build */

/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
Expand All @@ -71,11 +76,6 @@ struct snd_dlsym_link {

extern struct snd_dlsym_link *snd_dlsym_start;

#ifndef __STRING
/** \brief Return 'x' argument as string */
#define __STRING(x) #x
#endif

/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
#define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
/**
Expand Down

0 comments on commit 10bd599

Please sign in to comment.