Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
/usr/include/linux/netfilter/nfnetlink_log.h won't compile cleanly in userspace due to use of kernel type definitions.
Version-Release number of selected component (if applicable):
2.6.32
How reproducible:
Create file 'test.c' containing
#include </usr/include/linux/netfilter/nfnetlink_log.h>
and compile with
gcc -c test.c
Actual results:
Compile errors with
In file included from test.c:7:
/usr/include/linux/netfilter/nfnetlink_log.h:31: error: expected specifier-qualifier-list before ‘aligned_be64’
Expected results:
Header file should compile cleanly in userspace.
Additional info:
Later kernels use a different typedef and define it in 'types.h'.
"nfnetlink_log.h"
struct nfulnl_msg_packet_timestamp {
__aligned_be64 sec;
__aligned_be64 usec;
};
"types.h"
/*
* aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
* common 32/64-bit compat problems.
* 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
* architectures) and to 8-byte boundaries on 64-bit architetures. The new
* aligned_64 type enforces 8-byte alignment so that structs containing
* aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
* No conversions are necessary between 32-bit user-space and a 64-bit kernel.
*/
#define __aligned_u64 __u64 __attribute__((aligned(8)))
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
Comment 3RHEL Program Management
2012-01-13 16:00:22 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update release.
reproduced on kernel-2.6.32-131.0.105.el6
[atheism@localhost c]$ gcc log.c -o log
In file included from log.c:1:
/usr/include/linux/netfilter/nfnetlink_log.h:31: error: expected specifier-qualifier-list before ‘aligned_be64’
[atheism@localhost c]$ uname -a
Linux localhost 2.6.32-131.0.15.el6.i686 #1 SMP Tue May 10 15:42:28 EDT 2011 i686 i686 i386 GNU/Linux
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2012-0862.html
Description of problem: /usr/include/linux/netfilter/nfnetlink_log.h won't compile cleanly in userspace due to use of kernel type definitions. Version-Release number of selected component (if applicable): 2.6.32 How reproducible: Create file 'test.c' containing #include </usr/include/linux/netfilter/nfnetlink_log.h> and compile with gcc -c test.c Actual results: Compile errors with In file included from test.c:7: /usr/include/linux/netfilter/nfnetlink_log.h:31: error: expected specifier-qualifier-list before ‘aligned_be64’ Expected results: Header file should compile cleanly in userspace. Additional info: Later kernels use a different typedef and define it in 'types.h'. "nfnetlink_log.h" struct nfulnl_msg_packet_timestamp { __aligned_be64 sec; __aligned_be64 usec; }; "types.h" /* * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid * common 32/64-bit compat problems. * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other * architectures) and to 8-byte boundaries on 64-bit architetures. The new * aligned_64 type enforces 8-byte alignment so that structs containing * aligned_64 values have the same alignment on 32-bit and 64-bit architectures. * No conversions are necessary between 32-bit user-space and a 64-bit kernel. */ #define __aligned_u64 __u64 __attribute__((aligned(8))) #define __aligned_be64 __be64 __attribute__((aligned(8))) #define __aligned_le64 __le64 __attribute__((aligned(8)))