Bug 249811

Summary: Type __s64 may be not decleared
Product: Red Hat Enterprise Linux 5 Reporter: Andrew <ppavliks>
Component: kernelAssignee: Anton Arapov <anton>
Status: CLOSED NOTABUG QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 5.0CC: dzickus, nobody
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-06 11:11:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Patch to /usr/include/linux/videodev2.patch
none
kernel-headers rpm none

Description Andrew 2007-07-27 08:32:55 UTC
Description of problem:
Type __s64 may be not declared in the file /usr/include/linux/videodev2.h on
line 622 and compiler exit with an error. I think it will be not bad to use #if
defined statement.


Version-Release number of selected component (if applicable):

[root@build linux]# rpm -qf videodev2.h
kernel-headers-2.6.18-8.el5


Additional info:
Small patch attached.

Comment 1 Andrew 2007-07-27 08:32:55 UTC
Created attachment 160104 [details]
Patch to /usr/include/linux/videodev2.patch

Comment 2 Anton Arapov 2007-08-04 10:46:26 UTC
It seems, you have incorrect videodev2.h header, probably derived from somewhere
else. Please, check twice yours kernel-header package. It must contain correct
version of mentioned header.

Please, inform me about the result. And provide me your kernel-header package in
bad case.

Comment 3 Andrew 2007-08-06 06:14:05 UTC
Created attachment 160728 [details]
kernel-headers rpm

Comment 4 Andrew 2007-08-06 06:16:17 UTC
[root@build ~]# rpm -q kernel-headers
kernel-headers-2.6.18-8.el5

It's unmodified RPM-package from RHEL5 distr.

Comment 5 Anton Arapov 2007-08-06 07:23:38 UTC
  So you have non original videodev2.h. As you can see there is correct header
in the original rpm, for sure.
  Please, reinstall this package on your pc. 

Comment 6 Andrew 2007-08-06 07:37:22 UTC
I think you don't understand my question.

On the line 622 you can see "__s64 value64;". Where the type "__s64" declared?
I've compile a program and compilation failed because of undeclared type so as a
variant I propose to use "#if defined" before this line.

	

Comment 7 Anton Arapov 2007-08-06 08:13:53 UTC
Yep, I've got it... But I can't reproduce this problem, I mean, I have no
problem with __s64 type using in this struct. Can you write some reproducing
this bug code.

Comment 8 Andrew 2007-08-06 08:28:25 UTC
I found that while I compiled kopete 0.12.2 http://kopete.kde.org/releases.php
(Source package link). 

Type "__s64" declared in the asm/types.h. We can see "#if defined(__GNUC__) &&
!defined(__STRICT_ANSI__)" above this declaration. But there is no checking of
this condition in videodev2.h.


Comment 9 Anton Arapov 2007-08-06 10:51:44 UTC
Ok. The fix proposed by you is not the root of the problem. This problem was
already discussed on LKML: http://marc.info/?l=linux-kernel&m=115830263230795&w=2

I think, the best for you in this case to use the same construction as used for
__u64, for the same reason, in kopete/libkopete/avdevice/videodevice.h, just add
the following lines to this header:
#ifndef __s64 //required by videodev.h
#define __s64 __signed__ long long
#endif // __s64


Comment 10 Andrew 2007-08-06 11:07:55 UTC
Well, I can solve problem myself. If it is not a problem of kernel-headers it's
good. Thank you!