Bug 170174 - syscall6() fails to compile with g++
syscall6() fails to compile with g++
Product: Fedora
Classification: Fedora
Component: glibc-kernheaders (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-10-08 04:44 EDT by Arun Sharma
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-30 05:16:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
This patch works for me (1.69 KB, patch)
2005-10-08 04:48 EDT, Arun Sharma
no flags Details | Diff

  None (edit)
Description Arun Sharma 2005-10-08 04:44:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:

When syscall6 is used with a return type of void *, g++ gives an error message complaining about a long int (return type of syscall) being type cast to void *.

The attached patch adds an explicit cast that fixes it for me.

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

How reproducible:

Steps to Reproduce:
1. Use syscallN() to define a syscall wrapper that returns type != long
2. Compile with g++

Actual Results:  Compile error

Expected Results:  No compile error

Additional info:
Comment 1 Arun Sharma 2005-10-08 04:48:03 EDT
Created attachment 119728 [details]
This patch works for me
Comment 2 David Woodhouse 2006-09-30 05:16:20 EDT
syscall6() is a kernel-private thing. Use glibc's syscall().

Fixed, by removing syscall6() from user visibility entirely, in FC6.

Note You need to log in before you can comment on or make changes to this bug.