Discussion:
[dmidecode] [PATCH] Added support for Apple macOS
Ryan Armstrong
2017-07-01 13:13:59 UTC
Permalink
Hi dmidecode team,

As discussed with Jean Delvare on Linked-In, please see attached for
my patch to add support for macOS to dmidecode.

This patch has been distributed for some time now via
https://github.com/cavaliercoder/dmidecode-osx and homebrew. I have
however, tidied the patch a little in preparation for submitting it to
you.

A few notes concerning the change:

- compiler warnings from upstream code were suppressed on macOS with
`-Wno-constant-logical-operand`

  dmidecode.c:4514:26: warning: use of logical '&&' with constant operand

- ALIGNMENT_WORKAROUND was required also on macOS and so the
conditional was expanded to include __LP64__

- The call to CFRelease on 4814 throws 'Segmentation fault: 11' since
macOS 10.12, if the compiled binary is not signed with an Apple
developer profile

Thanks for your consideration. I’d be happy to adjust the patch to your liking.

Regards,

Ryan Armstrong
_______________________________________________
https://lists.nongnu.org/mailman/listinfo/dmidecode-dev
Jean Delvare
2017-09-14 08:55:44 UTC
Permalink
Hi Ryan,
Post by Ryan Armstrong
Hi dmidecode team,
As discussed with Jean Delvare on Linked-In, please see attached for
my patch to add support for macOS to dmidecode.
This patch has been distributed for some time now via
https://github.com/cavaliercoder/dmidecode-osx and homebrew. I have
however, tidied the patch a little in preparation for submitting it to
you.
- compiler warnings from upstream code were suppressed on macOS with
`-Wno-constant-logical-operand`
  dmidecode.c:4514:26: warning: use of logical '&&' with constant operand
- ALIGNMENT_WORKAROUND was required also on macOS and so the
conditional was expanded to include __LP64__
- The call to CFRelease on 4814 throws 'Segmentation fault: 11' since
macOS 10.12, if the compiled binary is not signed with an Apple
developer profile
Thanks for your consideration. I’d be happy to adjust the patch to your liking.
Did you intend to attach or inline the patch but forgot to do so? Or it
was somehow eaten along the way?
--
Jean Delvare
SUSE L3 Support

_______________________________________________
https://lists.nongnu.org/mailman/listinfo/dmidecode
Loading...