[MacPorts] #61990: xdotool does not compile on Big Sur

MacPorts noreply at macports.org
Mon Jan 4 17:40:17 UTC 2021


#61990: xdotool does not compile on Big Sur
--------------------+---------------------
 Reporter:  iay     |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.6.4
 Keywords:          |       Port:  xdotool
--------------------+---------------------
 Under:

 {{{
 :debug:sysinfo macOS 11.1 (darwin/20.2.0) arch i386
 :debug:sysinfo MacPorts 2.6.4
 :debug:sysinfo Xcode 12.3
 :debug:sysinfo SDK 11.1
 :debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 11.1
 }}}

 Compilation of xdotool fails with:

 {{{
 :info:build xdo.c:1365:26: error: implicit declaration of function
 'strdup' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 :info:build   keyseq_copy = strptr = strdup(keyseq);
 :info:build                          ^
 }}}

 I think this is down to strdup not being part of ANSI C / C99, but being
 part of POSIX. In the string.h header:

 {{{
 #if __DARWIN_C_LEVEL >= 200112L
 __BEGIN_DECLS
 int      strerror_r(int __errnum, char *__strerrbuf, size_t __buflen);
 char    *strdup(const char *__s1);
 void    *memccpy(void *__dst, const void *__src, int __c, size_t __n);
 __END_DECLS
 #endif /* __DARWIN_C_LEVEL >= 200112L */
 }}}

 My knowledge of C is pretty old, though, so I'm not sure how you would
 begin to fix this. Happily I don't have a current need for this port under
 Big Sur.

-- 
Ticket URL: <https://trac.macports.org/ticket/61990>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list