Skip to content

SunOS getlocalename_l() redeclaration #144

@outpaddling

Description

@outpaddling

Building devel/m4 and several gettext-* packages on Openindiana errors out with the following:

  CC       localename.o
localename.c:55:15: error: conflicting types for 'getlocalename_l'; have 'char *(int,  struct _locale *)'
   55 | extern char * getlocalename_l(int, locale_t);
      |               ^~~~~~~~~~~~~~~
In file included from ./locale.h:41,
                 from localename.c:34:
/usr/include/locale.h:98:20: note: previous declaration of 'getlocalename_l' with type 'const char *(int,  struct _locale *)'
   98 | extern const char *getlocalename_l(int, locale_t);
      |                    ^~~~~~~~~~~~~~~
*** [localename.o] Error code 1

bmake[3]: stopped making "all-am" in /export/home/bacon/Dreckly/dreckly/devel/m4/work/m4-1.4.19/lib

It's easily worked around by commenting out the hacked-in prototype in localename.c, but I'm concerned that doing this will break builds on other SunOS-based systems, to which I have no direct access for testing.

Can someone working with SunOS derivatives could propose a safe solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions