Closed Bug 1650495 Opened 4 years ago Closed 4 years ago

[esr78] error: implicit declaration of function 'read/write' is invalid in C99

Categories

(MailNews Core :: LDAP Integration, defect)

All
macOS
defect

Tracking

(thunderbird_esr78 affected, thunderbird77 unaffected)

RESOLVED DUPLICATE of bug 1652906
Tracking Status
thunderbird_esr78 --- affected
thunderbird77 --- unaffected

People

(Reporter: Nomis101, Unassigned)

References

Details

Attachments

(1 file)

Attached file buildlog

Everytime I try to build Thunderbird ESR78 it stops with some compile errors for /ldap/c-sdk. System is macOS 10.15.

error: implicit declaration of function 'x' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

I've tried so silence this by adding --disable-warnings-as-errors to my mozconfig, but this did not help. I've attached the full buildlog.

Thunderbird 77 did build without any error the same way.

This is not an issue for Firefox ESR78. Firefox ESR78 builds without any issue (same code, similar mozconifig).

Component: Build Config → General
Product: Thunderbird → MailNews Core

Possibly you could get it building by adding -Wno-implicit-function-declaration

I guess the real fix is to properly include the right header files for that. I see

 2:55.03 /Volumes/Developer/mozilla-esr78/comm/ldap/c-sdk/libraries/liblber/io.c:162:12: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 2:55.03       rc = read(sb->sb_sd, sb->sb_ber.ber_buf,
 2:55.03            ^
 2:55.03 /Volumes/Developer/mozilla-esr78/comm/ldap/c-sdk/libraries/liblber/io.c:162:12: note: did you mean 'fread'?
 2:55.03 /Volumes/Developer/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:158:9: note: 'fread' declared here
 2:55.03 size_t   fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream);
Component: General → LDAP Integration
Summary: [esr78] error: implicit declaration of function 'x' is invalid in C99 → [esr78] error: implicit declaration of function 'read/write' is invalid in C99

(In reply to Magnus Melin [:mkmelin] from comment #2)

Possibly you could get it building by adding -Wno-implicit-function-declaration

Yes, this does work. Thanks. I thought --disable-warnings-as-errors is doing the same thing, but it seems not.

Blocks: tb78found

Looks like this was fixed in bug 1652906

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: