| Summary: | fix lang/php4 configure to detect various crypt()s on 64-bit platforms | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Anton Berezin <tobez> |
| Component: | Individual Port(s) | Assignee: | Alex Dupre <ale> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-ports-bugs->ale Over to maintainer. State Changed From-To: open->closed Committed, thanks! This port is still broken.
Needs following patch:
--- Makefile.orig Thu Mar 3 19:21:40 2005
+++ Makefile Thu Mar 3 19:20:23 2005
@@ -168,6 +168,9 @@
post-patch:
@${TOUCH} ${WRKSRC}/ext/php_config.h
@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|"
${WRKSRC}/php.ini-*
+ @${REINPLACE_CMD} \
+ "s|<crypt.h>|<unistd.h>|g;s|HAVE_CRYPT_H|HAVE_UNISTD_H|
g" \
+ ${WRKSRC}/configure
.if ${PHP_SAPI} == "full"
pre-configure:
--
Adam Gregoire <bsdunx@gmail.com>
This port is still broken.
Needs following patch:
--- Makefile.orig Thu Mar 3 19:21:40 2005
+++ Makefile Thu Mar 3 19:20:23 2005
@@ -168,6 +168,9 @@
post-patch:
@${TOUCH} ${WRKSRC}/ext/php_config.h
@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|"
${WRKSRC}/php.ini-*
+ @${REINPLACE_CMD} \
+ "s|<crypt.h>|<unistd.h>|g;s|HAVE_CRYPT_H|HAVE_UNISTD_H|
g" \
+ ${WRKSRC}/configure
.if ${PHP_SAPI} == "full"
pre-configure:
|
The configure script fails to detect various crypt()-related functionality (DES/MD5/Blowfish) on amd64 platform. Fix: This is needed since without having HAVE_CRYPT_H replaced with HAVE_UNISTD_H, unistd.h is never included in those pieces of configure that originally try to include crypt.h. This goes unnoticed on 32-bit platforms, since sizeof(int) == sizeof(char *), but leads to a coredump on 64-bit platforms (well, at least on amd64) when crypt() is implicitly defined and assumes an int return argument.--A5GgtfAlHbI16sH8CT1sOokQ8xG0ddtpvFFmonOKdzub5Gnb Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- Makefile.orig Tue Nov 30 22:14:27 2004 +++ Makefile Tue Nov 30 22:14:51 2004 @@ -164,6 +164,7 @@ post-patch: @${TOUCH} ${WRKSRC}/ext/php_config.h @${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-* @${REINPLACE_CMD} "s|<crypt.h>|<unistd.h>|g" ${WRKSRC}/configure + @${REINPLACE_CMD} "s|HAVE_CRYPT_H|HAVE_UNISTD_H|g" ${WRKSRC}/configure .if ${PHP_SAPI} == "full" pre-configure: How-To-Repeat: Build lang/php4 on an amd64 system, observe configure output.