[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#323716: marked as done (apt uses wrong prototype for getsockopt)



Your message dated Thu, 13 Aug 2015 12:25:11 +0200
with message-id <20150813102511.GA5637@crossbow>
and subject line Re: apt uses wrong prototype for getsockopt
has caused the Debian Bug report #323716,
regarding apt uses wrong prototype for getsockopt
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
323716: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323716
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.5.4

(also present in 0.6.40.1)

In methods/connect.cc, getsockopt() is used as:

  unsigned int Err;
  unsigned int Len = sizeof(Err);
  if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
     return _error->Errno("getsockopt",_("Failed"));

and similarly in methods/ftp.cc. That fifth parameter type is
functionally correct on some platforms, but is not the documented
prototype on many and is not even functionally equivalent on some. The
alternative standard apears to be:

  int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);

I get compiler warnings on my darwin/ppc machines where socklen_t is
an int, or a size_t especially on 64-bit machines where size_t is
larger than an int. There is already a configure test for the presence
of a socklen_t type; can one assume that the fifth parameter to
getsockopt should always be socklen_t if that type exists?
Alternativelly, I've seen some programs do a configure test
specifically to determine the fifth argument of getsockopt. Any
thoughts on improving the platform portability here?

dan


--- End Message ---
--- Begin Message ---
Hi,

On Thu, Aug 18, 2005 at 12:37:36AM -0400, Daniel Macks wrote:
> specifically to determine the fifth argument of getsockopt. Any
> thoughts on improving the platform portability here?

Seems like nobody had any thought on portability in 10 years… so lets
put my thoughts here:

We are happy to apply reasonable patches for plattforms not supported by
Debian, but please understand that we can't go on a scavanger hunt for
all the things we could possibly change to support everything under the
sun on our own for the lack of manpower and time.

I am hence closing this bugreport as nobody stepped up to do it for 10
years, I doubt someone will in the next 10 years and stumble over this
bug… better if a new bug is opened in the event of a porter being
suddently interested in it!

Note that Debian has (multiple) powerpc ports, so the issue you
describe here seems to be resolved some way in the meantime anyhow?!


Best regards

David Kalnischkies

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: