• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Asterisk-bsd] utils.c will not compile

 
   AsteriskGuru Archives Forum Index -> Asterisk-BSD
View previous topic :: View next topic  
Author Message
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:10 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Anyone else having problems compiling util.c with the new ntoa function?
Using latest CVS, it compiles on Linux, but not on FreeBSD

In file included from utils.c:19:
include/asterisk/utils.h:35: warning: `inet_ntoa' redefined
/usr/include/arpa/inet.h:78: warning: this is the location of the previous definition
In file included from utils.c:12:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
In file included from utils.c:19:
include/asterisk/utils.h:32: warning: parameter has incomplete type
utils.c:332: parameter `ia' has incomplete type
gmake: *** [utils.o] Error 1

/Olle

Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:38 pm    Post subject: [Asterisk-bsd] utils.c will not compile

This is a multi-part message in MIME format.

------=_NextPart_000_0059_01C45DDE.5EF78860
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Here's a fix. I don't see there other warnings with cvs-head, but if they
persist, just say so and we can take another look!

Rich

Quote:
-----Original Message-----
From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
admin@lists.digium.com] On Behalf Of Olle E. Johansson
Sent: Tuesday, June 29, 2004 1:10 PM
To: asterisk-bsd@lists.digium.com
Subject: [Asterisk-bsd] utils.c will not compile

Anyone else having problems compiling util.c with the new ntoa function?
Using latest CVS, it compiles on Linux, but not on FreeBSD

In file included from utils.c:19:
include/asterisk/utils.h:35: warning: `inet_ntoa' redefined
/usr/include/arpa/inet.h:78: warning: this is the location of the previous
definition
In file included from utils.c:12:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
In file included from utils.c:19:
include/asterisk/utils.h:32: warning: parameter has incomplete type
utils.c:332: parameter `ia' has incomplete type
gmake: *** [utils.o] Error 1

/Olle
_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd


------=_NextPart_000_0059_01C45DDE.5EF78860
Content-Type: text/plain;
name="utils.h.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="utils.h.txt"

Index: include/asterisk/utils.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /usr/cvsroot/asterisk/include/asterisk/utils.h,v=0A=
retrieving revision 1.5=0A=
diff -u -r1.5 utils.h=0A=
--- include/asterisk/utils.h 29 Jun 2004 12:56:46 -0000 1.5=0A=
+++ include/asterisk/utils.h 29 Jun 2004 18:36:51 -0000=0A=
@@ -32,6 +32,9 @@=0A=
extern const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr =
ia);=0A=
extern int ast_utils_init(void);=0A=
=0A=
+#ifdef inet_ntoa=0A=
+#undef inet_ntoa=0A=
+#endif=0A=
#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__=0A=
=0A=
#endif=0A=

------=_NextPart_000_0059_01C45DDE.5EF78860--



Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:41 pm    Post subject: [Asterisk-bsd] utils.c will not compile

That's because of:

#define inet_ntoa __inet_ntoa

in arpa/inet.h

If you change the new #define inet_ntoa that errors to something like

#ifdef inet_ntoa
# undef inet_ntoa
#endif
#define inet_ntoa _dont_use_me_use_ast_inet_ntoa

the error will go away.

Chris.


Olle E. Johansson wrote (on Jun 29):
Quote:
Anyone else having problems compiling util.c with the new ntoa function?
Using latest CVS, it compiles on Linux, but not on FreeBSD

In file included from utils.c:19:
include/asterisk/utils.h:35: warning: `inet_ntoa' redefined
/usr/include/arpa/inet.h:78: warning: this is the location of the previous
definition
In file included from utils.c:12:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
In file included from utils.c:19:
include/asterisk/utils.h:32: warning: parameter has incomplete type
utils.c:332: parameter `ia' has incomplete type
gmake: *** [utils.o] Error 1

/Olle
_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd

--

== chrisy@flirble.org

Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:44 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Dr. Rich Murphey wrote:

Quote:
Here's a fix. I don't see there other warnings with cvs-head, but if they
persist, just say so and we can take another look!
Included

+#include <netinet/in.h>
in utils.c and suddenly I compiled. Still get the warnings, so your fix is good
as well.

See bug #1949

/Olle


Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:50 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Good fix. Still get a lot of these:

In file included from app_festival.c:22:
../include/asterisk/utils.h:32: warning: `struct in_addr' declared inside parameter list
../include/asterisk/utils.h:32: warning: its scope is only this definition or declaration, which is probably not what you want.
../include/asterisk/utils.h:32: warning: parameter has incomplete type

Any help?

/O

Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:53 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Is it FreeBSD 4.9 or 10 where you see the warnings?

Rich

Quote:
-----Original Message-----
From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
admin@lists.digium.com] On Behalf Of Olle E. Johansson
Sent: Tuesday, June 29, 2004 1:44 PM
To: asterisk-bsd@lists.digium.com
Subject: Re: [Asterisk-bsd] utils.c will not compile

Dr. Rich Murphey wrote:

> Here's a fix. I don't see there other warnings with cvs-head, but if
they
> persist, just say so and we can take another look!
Included
+#include <netinet/in.h>
in utils.c and suddenly I compiled. Still get the warnings, so your fix is
good
as well.

See bug #1949

/Olle

_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd





Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 6:55 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Make sure utils.h has #include <netinet/in.h> somewhere in its include
tree.

Chris.

Olle E. Johansson wrote (on Jun 29):
Quote:
Good fix. Still get a lot of these:

In file included from app_festival.c:22:
../include/asterisk/utils.h:32: warning: `struct in_addr' declared inside
parameter list
../include/asterisk/utils.h:32: warning: its scope is only this definition
or declaration, which is probably not what you want.
../include/asterisk/utils.h:32: warning: parameter has incomplete type

Any help?

/O
_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd

--

== chrisy@flirble.org

Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 7:06 pm    Post subject: [Asterisk-bsd] utils.c will not compile

This is a multi-part message in MIME format.

------=_NextPart_000_0062_01C45DE2.37C1B410
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Yep, attached!

Rich

Quote:
-----Original Message-----
From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
admin@lists.digium.com] On Behalf Of Chris Luke
Sent: Tuesday, June 29, 2004 1:55 PM
To: asterisk-bsd@lists.digium.com
Subject: Re: [Asterisk-bsd] utils.c will not compile

Make sure utils.h has #include <netinet/in.h> somewhere in its include
tree.

Chris.

Olle E. Johansson wrote (on Jun 29):
> Good fix. Still get a lot of these:
>
> In file included from app_festival.c:22:
> ../include/asterisk/utils.h:32: warning: `struct in_addr' declared
inside
> parameter list
> ../include/asterisk/utils.h:32: warning: its scope is only this
definition
> or declaration, which is probably not what you want.
> ../include/asterisk/utils.h:32: warning: parameter has incomplete type
>
> Any help?
>
> /O
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
--
== chrisy@flirble.org
_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd



------=_NextPart_000_0062_01C45DE2.37C1B410
Content-Type: text/plain;
name="utils.c.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="utils.c.txt"

Index: utils.c=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /usr/cvsroot/asterisk/utils.c,v=0A=
retrieving revision 1.14=0A=
diff -u -r1.14 utils.c=0A=
--- utils.c 29 Jun 2004 12:56:46 -0000 1.14=0A=
+++ utils.c 29 Jun 2004 19:04:25 -0000=0A=
@@ -14,6 +14,7 @@=0A=
#include <unistd.h>=0A=
#include <sys/types.h>=0A=
#include <sys/socket.h>=0A=
+#include <netinet/in.h>=0A=
#include <arpa/inet.h>=0A=
#include <asterisk/lock.h>=0A=
#include <asterisk/utils.h>=0A=

------=_NextPart_000_0062_01C45DE2.37C1B410--



Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 7:38 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Dr. Rich Murphey wrote:

Quote:
Is it FreeBSD 4.9 or 10 where you see the warnings?
Still on 4.9...


4.9-RELEASE-p10

/O



Back to top
asterisk-bsd at lists.dig
Guest





PostPosted: Tue Jun 29, 2004 7:39 pm    Post subject: [Asterisk-bsd] utils.c will not compile

Dr. Rich Murphey wrote:

Quote:
Yep, attached!

Already in CVS :-)

/O

Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-BSD All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™