amd64/82380: buildworld error in libc
Stanislav Sedov
stas at 310.ru
Sat Jun 18 10:10:24 GMT 2005
>Number: 82380
>Category: amd64
>Synopsis: buildworld error in libc
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 18 10:10:23 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Stanislav Sedov
>Release: FreeBSD 5.4-STABLE amd64
>Organization:
310.ru [Tridesyatoe]
>Environment:
System: FreeBSD de7.310.ru 5.4-STABLE FreeBSD 5.4-STABLE #4: Sat Jun 18 00:29:33 MSD 2005 root at de7.310.ru:/usr/src/sys/amd64/compile/DE7 amd64
>Description:
As "make buildworld" compile libc with -Werror enabled, the warnings
about type conversions in lib/libc/i386/sys/_amd64_get_gsbase.c and lib/libc/i386/sys/_amd64_get_fsbase.c stop building. The following patch would help.
>How-To-Repeat:
cd /usr/src; make buildworld
>Fix:
--- diff1 begins here ---
--- lib/libc/i386/sys/_amd64_get_gsbase.c.orig Sat Nov 27 23:24:31 2004
+++ lib/libc/i386/sys/_amd64_get_gsbase.c Sat Jun 18 17:28:45 2005
@@ -33,11 +33,11 @@
int
_amd64_get_gsbase(void **addr)
{
- uint64_t addr64;
+ uint64_t addr64[1];
int ret;
- addr64 = 0;
- ret = sysarch(_AMD64_GET_GSBASE, (void **)(&addr64));
+ addr64[0] = 0;
+ ret = sysarch(_AMD64_GET_GSBASE, &addr64);
if (ret != -1)
*addr = (void *)(uintptr_t)addr64;
return ret;
--- diff1 ends here ---
--- diff2 begins here ---
--- lib/libc/i386/sys/_amd64_get_fsbase.c.orig Sat Nov 27 23:24:31 2004
+++ lib/libc/i386/sys/_amd64_get_fsbase.c Sat Jun 18 17:28:36 2005
@@ -33,11 +33,11 @@
int
_amd64_get_fsbase(void **addr)
{
- uint64_t addr64;
+ uint64_t addr64[1];
int ret;
- addr64 = 0;
- ret = sysarch(_AMD64_GET_FSBASE, (void **)(&addr64));
+ addr64[0] = 0;
+ ret = sysarch(_AMD64_GET_FSBASE, &addr64);
if (ret != -1)
*addr = (void *)(uintptr_t)addr64;
return ret;
--- diff2 ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-amd64
mailing list