FreeBSD Bugzilla – Attachment 238609 Details for
Bug 268232
devel/p5-IO-Tty: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/p5-IO-Tty: fix build with clang 15
devel__p5-IO-Tty-fix-clang15-build-1.diff (text/plain), 2.39 KB, created by
Dimitry Andric
on 2022-12-07 17:54:17 UTC
(
hide
)
Description:
devel/p5-IO-Tty: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-07 17:54:17 UTC
Size:
2.39 KB
patch
obsolete
>commit ddb236552eb8e13e9d24ab7f4867ce4ca0d82e54 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Wed Dec 7 18:46:31 2022 +0100 > > 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. > >diff --git a/devel/p5-IO-Tty/files/patch-Makefile.PL b/devel/p5-IO-Tty/files/patch-Makefile.PL >new file mode 100644 >index 000000000000..a8901338a67e >--- /dev/null >+++ b/devel/p5-IO-Tty/files/patch-Makefile.PL >@@ -0,0 +1,11 @@ >+--- Makefile.PL.orig 2021-01-22 08:02:35 UTC >++++ Makefile.PL >+@@ -146,7 +146,7 @@ char $f (); >+ /* We use char because int might match the return type of a gcc2 >+ builtin and then its argument prototype would still apply. */ >+ char $f (); >+-char (*f) (); >++char f; >+ >+ #ifdef F77_DUMMY_MAIN >+ # ifdef __cplusplus
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268232
: 238609