freebsd-ports/devel/p5-IO-Tty
Dimitry Andric 0f85c4d7e4 devel/p5-IO-Tty: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that
devel/p5-IO-Tty failed to build with clang 15:

  Tty.xs:190:1: error: static declaration of 'strlcpy' follows non-static declaration
  strlcpy(dst, src, siz)
  ^
  /usr/include/string.h:99:9: note: previous declaration is here
  size_t   strlcpy(char * __restrict, const char * __restrict, size_t);
           ^

This is because strlcpy() and various other functions are not correctly
detected at configure time:

  Looking for _getpty()...... not found.
  Looking for getpt()........ not found.
  Looking for grantpt()...... not found.
  Looking for openpty()...... not found.
  Looking for posix_openpt(). not found.
  Looking for ptsname()...... not found.
  Looking for ptsname_r().... not found.
  Looking for sigaction().... not found.
  Looking for strlcpy()...... not found.
  Looking for ttyname()...... not found.
  Looking for unlockpt()..... not found.
  Looking for libutil.h...... FOUND.
  Looking for pty.h.......... not found.
  Looking for sys/pty.h...... not found.
  Looking for sys/ptyio.h.... not found.
  Looking for sys/stropts.h.. not found.
  Looking for termio.h....... not found.
  Looking for termios.h...... FOUND.
  Looking for util.h......... not found.

Makefile.PL contains a C fragment that is used for this detection, but
it assigns the incorrect type to the value returned from the tested
function. This leads to compilation errors, even if the tested function
*is* available.

Fix this by using the correct type for the variable containing the
return value.

PR:		268232
Approved by:	portmgr (tcberner)
MFH:		2022Q4
2022-12-18 18:24:57 +01:00
..
files
distinfo
Makefile
pkg-descr
pkg-plist