~ubuntu-branches/ubuntu/trusty/conntrack/trusty-proposed

« back to all changes in this revision

Viewing changes to include/linux_list.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt, Max Kellermann
  • Date: 2008-04-14 23:09:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080414230922-9xoi1gl38tc8lyng
Tags: 1:0.9.6-4
[ Max Kellermann ]
fix compilation on SPARC (printf argument mismatch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef _LINUX_LIST_H
2
2
#define _LINUX_LIST_H
3
3
 
 
4
#include <stddef.h>
 
5
 
4
6
#undef offsetof
5
7
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
6
8
 
13
15
 *
14
16
 */
15
17
#define container_of(ptr, type, member) ({                      \
16
 
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
 
18
        typeof( ((type *)0)->member ) *__mptr = (ptr);  \
17
19
        (type *)( (char *)__mptr - offsetof(type,member) );})
18
20
 
19
21
/*