Skip to content

unpacking NDK r18 on Windows -- duplicate headers #806

Open

Description

@alexcohn

Description

I noticed that some headers under sysroot are missing in Windows version. Digging deeper, I find that the root cause is that there are files in Linux version with clashing names on Windows filesystem (which does not allow mixed letter case).

I don't have a specific error case at hand (luckily!), but I am afraid this should at the very least be documented somewhere.

Here is the full list of affected headers:

sysroot/usr/include/linux/netfilter/xt_CONNMARK.h
sysroot/usr/include/linux/netfilter/xt_DSCP.h
sysroot/usr/include/linux/netfilter/xt_MARK.h
sysroot/usr/include/linux/netfilter/xt_RATEEST.h
sysroot/usr/include/linux/netfilter/xt_TCPMSS.h
sysroot/usr/include/linux/netfilter_ipv4/ipt_ECN.h
sysroot/usr/include/linux/netfilter_ipv4/ipt_TTL.h
sysroot/usr/include/linux/netfilter_ipv6/ip6t_HL.h

Some of these headers are synomyms, like linux/netfilter/xt_CONNMARK.h, which does nothing but #include <linux/netfilter/xt_connmark.h>. Others could be easily merged together, like linux/netfilter/xt_DSCP.h wich has #include <linux/netfilter/xt_dscp.h> and adds some more definitions. But some are mutually exclusive, like linux/netfilter_ipv6/ip6t_HL.h and linux/netfilter_ipv6/ip6t_hl.h: they both are wrapped with #ifndef _IP6T_HL_H.

Note that on Windows 10 April 2018 Update, it's now possible to set up the relevant folders as case sensitive, by running (as Admin)

fsutil file setCaseSensitiveInfo %NDK_ROOT%\sysroot\usr\include\linux\netfilter enable
fsutil file setCaseSensitiveInfo %NDK_ROOT%\sysroot\usr\include\linux\netfilter_ipv4 enable
fsutil file setCaseSensitiveInfo %NDK_ROOT%\sysroot\usr\include\linux\netfilter_ipv6 enable

Environment Details

  • NDK Version: 18.0.5002713.
  • Host OS: Windows

Activity

  1. DanAlbert commented on Oct 8, 2018

    @DanAlbert
    Contributor

    But some are mutually exclusive, like linux/netfilter_ipv6/ip6t_HL.h and linux/netfilter_ipv6/ip6t_hl.h: they both are wrapped with #ifndef _IP6T_HL_H.

    From an email thread with gregkh, sounds like this isn't intentional.

    Note that on Windows 10 April 2018 Update, it's now possible to set up the relevant folders as case sensitive, by running (as Admin)

    That's cool, I hadn't heard of that. It's unfortunate that admin is needed though. Might be worth investigating.

  2. added this to the unplanned milestone on Oct 18, 2018
  3. DanAlbert commented on Apr 14, 2020

    @DanAlbert
    Contributor

    @enh-google Do you know if anything ever came from that thread? Was someone looking in to cleaning up the kernel headers?

  4. self-assigned this
    on Apr 14, 2020
  5. enh-google commented on Apr 14, 2020

    @enh-google
    Collaborator

    upstream is currently unchanged:

    $ grep -r IP6T_HL_H
    include/uapi/linux/netfilter_ipv6/ip6t_hl.h:#ifndef _IP6T_HL_H
    include/uapi/linux/netfilter_ipv6/ip6t_hl.h:#define _IP6T_HL_H
    include/uapi/linux/netfilter_ipv6/ip6t_HL.h:#ifndef _IP6T_HL_H
    include/uapi/linux/netfilter_ipv6/ip6t_HL.h:#define _IP6T_HL_H
    

    i'll try to get round sending a change upstream...

  6. enh-google commented on Apr 14, 2020

    @enh-google
    Collaborator

    (i've pinged the internal thread for a specific suggestion from the kernel maintainers, since this seems like a bikeshed nightmare!)

  7. abiiget7 commented on Apr 24, 2025

    @abiiget7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions