iOS 14 simulator builds fail due to typo in system macro

Number:rdar://FB8092539 Date Originated:7/21/2020
Status:Open Resolved:
Product:Simulator Product Version:14.0
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
Please describe the issue:

The CTL_HW_NAMES struct array macro defined in sysctl.h for the iOS 14.0 simulator has a typo-- there is no comma separating the third-to-last and second-to-last structs in the array.  This leads to any code referencing CTL_HW_NAMES failing to build for the simulator.

Please list the steps you took to reproduce the issue:

In an iOS project objective c file, `#import <sys/sysctl.h>`.  Then try to reference the macro in some line of code, such as `struct ctlname ctlnames[] = CTL_HW_NAMES;`.  Now try to build the project for the iOS 14 simulator.

What did you expect to happen?

I expected the project to build without errors.

What actually happened?

The project failed to build with these errors:

<source file>: error: expected '}'
            struct ctlname ctlnames[] = CTL_HW_NAMES;
In module 'Darwin' imported from <source file>:
/Applications/ note: expanded from macro 'CTL_HW_NAMES'
        { "target", CTLTYPE_STRING }, \
<source file>: note: to match this '{'
In module 'Darwin' imported from <source file>:
/Applications/ note: expanded from macro 'CTL_HW_NAMES'
#define CTL_HW_NAMES { \


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!