Very wired that, the two functions are both used in the same kext of mine, but strncasecmp() is OK, while strnstr() will trigger below error when loading the kext:
(kernel) kxld[com.dolphin.kext.aliedr]: The following symbols are unresolved for this kext:
(kernel) kxld[com.dolphin.kext.aliedr]: _strnstr
(kernel) Can't load kext com.dolphin.kext.aliedr - link failed.
After checked, they are both declared in the same header file -- macOS 10.15 > Frameworks > Kernel > string.h
strnstr is not part of any public KPI. And yeah, that is weird. You can file a bug about this if you like but, given our announced future direction with regards KEXTs, I wouldn’t get your hopes up.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"