Skip to content
  • Michael Abbott's avatar
    Make ioctl.h compatible with userland · 5f8c3c8e
    Michael Abbott authored
    
    
    The attached patch seems to already exist in a number of branches -- it
    keeps popping up on Google for me, and is certainly already in Debian --
    but is strangely absent from mainstream.
    
    The problem appears to be that the patched file ends up as part of the
    target toolchain, but unfortunately the gcc constant folding doesn't
    appear to eliminate the __invalid_size_argument_for_IOC value early
    enough.  Certainly compiling C++ programs which use _IO...  macros as
    constants fails without this patch.
    
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5f8c3c8e