public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Weigle <ehw@lanl.gov>
To: "Linux kernel mailing list (lkml)" <linux-kernel@vger.kernel.org>
Subject: [BUGLET][PATCH] #includes in asm-i386/checksum.h
Date: Mon, 21 Jan 2002 14:25:33 -0700	[thread overview]
Message-ID: <20020121212533.GC6291@lanl.gov> (raw)

Noticed this a while ago, still there in 2.4.17... checksum.h is not
self-consistent. Code which uses the file but does not know to include some
other headers first will get compile errors:

/usr/src/linux-2.4.17include/asm/checksum.h:159: warning: `struct in6_addr' declared inside parameter list
/usr/src/linux-2.4.17include/asm/checksum.h:159: warning: its scope is only this definition or declaration, which is probably not what you want.
/usr/src/linux-2.4.17include/asm/checksum.h: In function `csum_and_copy_to_user':
/usr/src/linux-2.4.17include/asm/checksum.h:188: warning: implicit declaration of function `access_ok'
/usr/src/linux-2.4.17include/asm/checksum.h:188: `VERIFY_WRITE' undeclared (first use in this function)
/usr/src/linux-2.4.17include/asm/checksum.h:188: (Each undeclared identifier is reported only once
/usr/src/linux-2.4.17include/asm/checksum.h:188: for each function it appears in.)

This only happens when one uses checksum.h without previously including the
other given headers, as might be done when people are writing some wack new
networking code (like me :)

Patch follows.

--------------------------------------------------------------------------------
--- checksum.h.original Thu Jul 26 14:41:22 2001
+++ checksum.h  Mon Jan 21 14:17:50 2002
@@ -1,6 +1,11 @@
 #ifndef _I386_CHECKSUM_H
 #define _I386_CHECKSUM_H
 
+/* Required for 'struct in6_addr' */
+#include <net/ipv6.h>
+
+/* Required for 'VERIFY_WRITE' #define */
+#include <asm/uaccess.h>
 
 /*
  * computes the checksum of a memory block at buff, length len,
--------------------------------------------------------------------------------


Thanks,
-Eric

-- 
--------------------------------------------
 Eric H. Weigle   CCS-1, RADIANT team
 ehw@lanl.gov     Los Alamos National Lab
 (505) 665-4937   http://home.lanl.gov/ehw/
--------------------------------------------

                 reply	other threads:[~2002-01-21 21:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020121212533.GC6291@lanl.gov \
    --to=ehw@lanl.gov \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox