Two 'if' blocks, one at lines 562-569, and the other at lines 1083-1084, in sys/dev/if_ndis/if_ndis.c are RUN-TIME tests for PCMCIA/PC-Card/CARDBUS hardware, and reference routines that exist only in the 'device pccard' support modules. Kernel linking fails if 'device pccard' is not included, even if the machine has no pccard hardware. Fix: bracket each of the 'if ()' blocks identified above with *COMPILE-TIME* '#if' or '#ifdef' conditionals on 'something' that is set only if 'device pccard' is in the config file. How-To-Repeat: attempt to compile a kernel with option NDISAPI device ndis device wlan and WITHOUT device pcard observe the linker failure.
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s).
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
This is still the problem for stable/11: if_ndis calls functions ndis_alloc_amem/ndis_free_amem from if_ndis_pccard without compile-time checks whether device pccard's included or not.
A commit references this bug: Author: avos Date: Wed Jan 30 11:40:13 UTC 2019 New revision: 343574 URL: https://svnweb.freebsd.org/changeset/base/343574 Log: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi <bonomi@host128.r-bonomi.com> MFC after: 1 week Changes: head/sys/compat/ndis/ndis_var.h head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndis_pccard.c
*** Bug 171531 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: avos Date: Wed Feb 6 02:06:01 UTC 2019 New revision: 343819 URL: https://svnweb.freebsd.org/changeset/base/343819 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi <bonomi@host128.r-bonomi.com> Changes: _U stable/11/ stable/11/sys/compat/ndis/ndis_var.h stable/11/sys/dev/if_ndis/if_ndis.c stable/11/sys/dev/if_ndis/if_ndis_pccard.c _U stable/12/ stable/12/sys/compat/ndis/ndis_var.h stable/12/sys/dev/if_ndis/if_ndis.c stable/12/sys/dev/if_ndis/if_ndis_pccard.c
A commit references this bug: Author: avos Date: Wed Feb 6 02:07:37 UTC 2019 New revision: 343820 URL: https://svnweb.freebsd.org/changeset/base/343820 Log: MFC r343574: Fix compilation with 'option NDISAPI + device ndis' and without 'device pccard' in the kernel config file. PR: 171532 Reported by: Robert Bonomi <bonomi@host128.r-bonomi.com> Changes: _U stable/10/ stable/10/sys/compat/ndis/ndis_var.h stable/10/sys/dev/if_ndis/if_ndis.c stable/10/sys/dev/if_ndis/if_ndis_pccard.c