Skip Menu |

This queue is for tickets about the User-Utmp CPAN distribution.

Report information
The Basics
Id: 43016
Status: open
Priority: 0/
Queue: User-Utmp

People
Owner: Nobody in particular
Requestors: rmandalemula [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Patch: To fix "called object is not a function" when using gcc
Attached patch fixes errors "called object is not a function..." when building the distribution using gcc. Please patch the source accordingly. Thanks. Rajesh
Subject: Utmp_xs.patch
--- Utmp.xs 2006-03-26 19:20:05.000000000 -0500 +++ Utmp-new.xs 2009-02-04 04:08:42.895383000 -0500 @@ -269,7 +269,7 @@ char *key; SV *val; I32 len; - STRLEN strlen; + STRLEN val_len; hv_iterinit(entry); @@ -282,14 +282,14 @@ { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_user, c_val, sizeof(utent->ut_user)); } else if (strEQ(key, "ut_line")) { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_line, c_val, sizeof(utent->ut_line)); } else if (strEQ(key, "ut_time")) @@ -302,7 +302,7 @@ { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_id, c_val, sizeof(utent->ut_id)); } else if (strEQ(key, "ut_pid")) @@ -342,7 +342,7 @@ { char *c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_host, c_val, sizeof(utent->ut_host)); } #endif @@ -350,8 +350,8 @@ #ifdef HAS_UT_ADDR else if (strEQ(key, "ut_addr")) { - memcpy(&utent->ut_addr, SvPV(val, strlen), - MIN(sizeof(utent->ut_addr), strlen)); + memcpy(&utent->ut_addr, SvPV(val, val_len), + MIN(sizeof(utent->ut_addr), val_len)); } #endif } @@ -364,7 +364,7 @@ char *key; SV *val; I32 len; - STRLEN strlen; + STRLEN val_len; /* Initialize the entry */ @@ -408,21 +408,21 @@ { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_name, c_val, sizeof(utent->ut_name)); } else if (strEQ(key, "ut_id")) { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_id, c_val, sizeof(utent->ut_id)); } else if (strEQ(key, "ut_line")) { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_line, c_val, sizeof(utent->ut_line)); } else if (strEQ(key, "ut_pid")) @@ -518,7 +518,7 @@ { char* c_val; - c_val = SvPV(val, strlen); + c_val = SvPV(val, val_len); strncpy(utent->ut_host, c_val, sizeof(utent->ut_host)); } #endif
Subject: Re: [rt.cpan.org #43016] Patch: To fix "called object is not a function" when using gcc
Date: Wed, 04 Feb 2009 10:57:29 +0100
To: bug-User-Utmp [...] rt.cpan.org
From: Michael Piotrowski <mxp [...] dynalabs.de>
Rajesh, On 2009-02-04, "Rajesh Mandalemula via RT" <bug-User-Utmp@rt.cpan.org> wrote: Show quoted text
> Attached patch fixes errors "called object is not a function..." when > building the distribution using gcc. Please patch the source > accordingly.
Thanks for the patch. I'll merge it into the next release. For the documentation: Could you please tell me for which version of gcc it is necessary? Thanks and greetings -- Michael Piotrowski, M.A. <mxp@dynalabs.de> Public key at <http://www.dynalabs.de/mxp/pubkey.txt> (ID 0x1614A044)
Subject: Re: [rt.cpan.org #43016] Patch: To fix "called object is not a function" when using gcc
Date: Fri, 6 Feb 2009 12:14:31 +0530 (IST)
To: bug-User-Utmp [...] rt.cpan.org
From: Rajesh Mandalemula <rmandalemula [...] yahoo.com>
I use gcc (GCC) 4.1.2 20071124 on a Red Hat box. Thanks Show quoted text
________________________________ From: Michael Piotrowski via RT <bug-User-Utmp@rt.cpan.org> To: rmandalemula@yahoo.com Sent: Wednesday, 4 February, 2009 3:28:22 PM Subject: Re: [rt.cpan.org #43016] Patch: To fix "called object is not a function" when using gcc <URL: http://rt.cpan.org/Ticket/Display.html?id=43016 > Rajesh, On 2009-02-04, "Rajesh Mandalemula via RT" <bug-User-Utmp@rt.cpan.org> wrote:
> Attached patch fixes errors "called object is not a function..." when > building the distribution using gcc. Please patch the source > accordingly.
Thanks for the patch.  I'll merge it into the next release.  For the documentation: Could you please tell me for which version of gcc it is necessary? Thanks and greetings -- Michael Piotrowski, M.A.                              <mxp@dynalabs.de> Public key at <http://www.dynalabs.de/mxp/pubkey.txt> (ID 0x1614A044) Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
I got the same problem with gcc 3.4 on RHEL 4.6: $ gcc --version gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-8) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Linux version 2.6.9-55.ELsmp (brewbuilder@hs20-bc2-4.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 SMP Fri Apr 20 16:36:54 EDT 2007 The patch works fine and saved me to search the reason on my own. Thanks!