Bug 254289 - [PATCH?] libifconfig_bridge.c causes a compilation error during `make buildworld`
Summary: [PATCH?] libifconfig_bridge.c causes a compilation error during `make buildwo...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-14 20:25 UTC by Christos Margiolis
Modified: 2024-04-14 21:07 UTC (History)
0 users

See Also:


Attachments
Line 54 fix (65 bytes, patch)
2021-03-14 20:25 UTC, Christos Margiolis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christos Margiolis freebsd_committer freebsd_triage 2021-03-14 20:25:22 UTC
Created attachment 223268 [details]
Line 54 fix

A compilation error was caused by `/usr/src/lib/libifconfig/libifconfig_bridge.c` during `make buildworld`. Unfortunately I forgot to copy the original error message, but the compiler complained that on line 54 there should be empty braces instead of { 0 }.

So I changed:

struct ifdrv ifd = { 0 };

to

struct ifdrv ifd = { };

and the compilation finished successfully.
Comment 1 Christos Margiolis freebsd_committer freebsd_triage 2021-03-14 20:48:03 UTC
Also I have to note that when I tried to compile just `libifconfig_bridge.c` alone without any compiler flags set (e.g cc -c libifconfig_bridge.c) it compiled just fine, without reporting any error for { 0 }, which is normal. I guess some compiler flag is set for `buildworld` that breaks it, but I'm not sure about that. In any case, my "fix" solved the problem.