[Bug 3482] Compilation fails with clang

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Oct 14 00:50:02 AEDT 2022


https://bugzilla.mindrot.org/show_bug.cgi?id=3482

haampie <me at harmenstoppels.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at harmenstoppels.nl

--- Comment #4 from haampie <me at harmenstoppels.nl> ---
openssh undefs it here:

/*
 * Don't let systems with broken printf(3) avoid our replacements
 * via asprintf(3)/vasprintf(3) calling libc internally.
 */
#if defined(BROKEN_SNPRINTF)
# undef HAVE_VASPRINTF
# undef HAVE_ASPRINTF
#endif

given BROKEN_SNPRINTF=1 in the config.log.

And it seems like the relevant configure test is broken?

| #include <stdio.h>
| #include <stdlib.h>
| #include <string.h>
| #ifdef HAVE_SNPRINTF
| main()
| {
|       char buf[50];
|       char expected_out[50];
|       int mazsize = 50 ;
| #if (SIZEOF_LONG_INT == 8)
|       long int num = 0x7fffffffffffffff;
| #else
|       long long num = 0x7fffffffffffffffll;
| #endif
|       strcpy(expected_out, "9223372036854775807");
|       snprintf(buf, mazsize, "%lld", num);
|       if(strcmp(buf, expected_out) != 0)
|               exit(1);
|       exit(0);
| }
| #else
| main() { exit(0); }
| #endif

there's no `int main` and it errors with 

conftest.c:367:1: error: type specifier missing, defaults to 'int'; ISO
C99 and later do not support implicit int [-Wimplicit-int]

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list