[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#339296: Linux header protection



Package: glibc
Severity: wishlist
Tags: patch

This patch implements header protection in Glibc stubs that just include
Linux headers (on GNU/Linux), but do something else on non-Linux platforms.

Once it is applied, these Linux headers can check wether they're being included
directly, and issue a warning (or error) about it.  For example, including
<linux/soundcard.h> directly is utterly wrong, because it breaks for all
non-Linux systems.  The standard header for OSS is <sys/soundcard.h>.  Etc.

This is the list of headers that this patch protects:

<net/ppp-comp.h>
<nfs/nfs.h>
<sys/soundcard.h>
<sys/ultrasound.h>
<sys/vt.h>

All of which are header stubs that just #include their corresponding linux/*.h
on GNU/Linux, but are also provided on other platforms like GNU/kFreeBSD.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-k7
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Attachment: linux-header-protection.dpatch
Description: application/shellscript


Reply to: