Re: Compile Problem !

Loz <[email protected]> Fri, 18 Jul 2003 22:39:13 +0100
Newsgroups org.kernel.vger.linux-diald
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------070404040102030602000102
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Zoup wrote:

>Got this error on make ! :( 
>
>iald.c
>diald.c: In function `main':
>diald.c:192: `CLK_TCK' undeclared (first use in this function)
>diald.c:192: (Each undeclared identifier is reported only once
>diald.c:192: for each function it appears in.)
>make: *** [diald.o] Error 1
>
>im running Slackware9 ! 
>what is the problem ? :) 
>
>thanks 
>  
>
I had this problem way back, I dredged this out of the archive - hope it 
still works. If it doesn't, try mucking around with #include 
<sys/time.h> and #include <time.h> some order and combination will 
probably work.

cheers

Loz


--------------070404040102030602000102
Content-Type: message/rfc822;
 name="message.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="message.eml"

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from localhost (localhost.localdomain [127.0.0.1])
	by flower.powernet.co.uk (Postfix) with ESMTP id 637C4462F4
	for <postmaster@localhost>; Mon,  2 Dec 2002 21:15:00 +0000 (GMT)
Received: from pop3.powernet.co.uk
	by localhost with POP3 (fetchmail-5.8.10)
	for postmaster@localhost (multi-drop); Mon, 02 Dec 2002 21:15:00 +0000 (GMT)
Received: from vger.kernel.org (vger.kernel.org [12.107.208.194])
	by mail-relay.power.net.uk (8.9.0/8.9.0) with ESMTP id UAA02782
	for <[email protected]>; Sat, 12 Jan 2002 20:24:19 GMT
Received: ([email protected]) by vger.kernel.org via listexpand
	id <S287432AbSALUYJ>; Sat, 12 Jan 2002 15:24:09 -0500
Received: ([email protected]) by vger.kernel.org
	id <S287429AbSALUX7>; Sat, 12 Jan 2002 15:23:59 -0500
Received: from mtiwmhc21.worldnet.att.net ([204.127.131.46]:26499 "EHLO
	mtiwmhc21.worldnet.att.net") by vger.kernel.org with ESMTP
	id <S287425AbSALUXo>; Sat, 12 Jan 2002 15:23:44 -0500
Received: from athlon ([12.89.150.85]) by mtiwmhc21.worldnet.att.net
          (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP
          id <20020112202337.EIPL5540.mtiwmhc21.worldnet.att.net@athlon>;
          Sat, 12 Jan 2002 20:23:37 +0000
Message-ID: <[email protected]>
X-Mailer: XFMail 1.5.2 on Linux
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="_=XFMail.1.5.2.Linux:20020112152313:4293=_"
Date: Sat, 12 Jan 2002 15:23:13 -0500 (EST)
From: [email protected]
To: [email protected], [email protected]
Subject: small  patches for diald (a better(?) CLK_TCK patch+a cast)
Sender: [email protected]
Precedence: bulk
X-Mailing-List: [email protected]
X-Fetchmail-Warning: no recipient addresses matched declared local names

This message is in MIME format
--_=XFMail.1.5.2.Linux:20020112152313:4293=_
Content-Type: text/plain; charset=us-ascii

Here are a couple of patches for diald-1.0.

If autoconf defines both
HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME
then *both* sys/time.h and time.h should be included,
but diald-1.0 fails to also include time.h, which defines CLK_TCK.
(older diald did include both)

Fixing this on a RedHat 7.x system (where both get defined)
fixes the undefined CLK_TCK problem in diald.c, without
messing with diald.c

So this may be the "correct" fix to the problem, rather than changing
#if CLK_TCK to #ifdef CLK_TCK in diald.c

the fix is now in diald.h:
--------------------------------------------------
diff -uNr diald-1.0/diald.h diald-1.0-patched/diald.h
--- diald-1.0/diald.h   Sat Jun 16 12:01:25 2001
+++ diald-1.0-patched/diald.h   Fri Sep  7 02:57:56 2001
@@ -29,6 +29,11 @@
 #include <signal.h>
 #if HAVE_SYS_TIME_H
 #  include <sys/time.h>
+#if TIME_WITH_SYS_TIME
+#  include <time.h>
+#endif
+#else
+#  include <time.h>
 #endif
 #ifdef _POSIX_PRIORITY_SCHEDULING
 #  include <sched.h>
----------------------------------------------------


(2) A compiler warning in timer.c is generated because the arguments of the
functions del_impulse() and del_connection()
in firewall.c should be passed as void * , and then be cast to
FW_unit * and FW_connection *, respectively.


This is fixed by the second attached patch




----------------------------------
E-Mail: [email protected]
Date: 12-Jan-2002
Time: 14:35:12

This message was sent by XFMail
----------------------------------

--_=XFMail.1.5.2.Linux:20020112152313:4293=_
Content-Disposition: attachment; filename="diald-1.0-void.patch"
Content-Transfer-Encoding: base64
Content-Description: diald-1.0-void.patch
Content-Type: application/octet-stream;
 name=diald-1.0-void.patch; SizeOnDisk=1733

ZGlmZiAtdU5yIGRpYWxkLTEuMC9kaWFsZC5oIGRpYWxkLTEuMC12b2lkL2RpYWxkLmgKLS0tIGRp
YWxkLTEuMC9kaWFsZC5oCVNhdCBKdW4gMTYgMTI6MDE6MjUgMjAwMQorKysgZGlhbGQtMS4wLXZv
aWQvZGlhbGQuaAlTYXQgSmFuIDEyIDE0OjAzOjUzIDIwMDIKQEAgLTQ4OCw2ICs0ODgsNiBAQAog
aW50IGdldHByb3RvY29sKGNvbnN0IGNoYXIgKm5hbWUpOwogY2hhciAqZ2V0cHJvdG9udW1iZXIo
aW50IHByb3RvKTsKIGludCBnZXRzbihGSUxFICpmcCxjaGFyICpidWYsaW50IGxlbik7Ci12b2lk
IGRlbF9pbXB1bHNlKEZXX3VuaXQgKnVuaXQpOwotdm9pZCBkZWxfY29ubmVjdGlvbihGV19Db25u
ZWN0aW9uICpjKTsKK3ZvaWQgZGVsX2ltcHVsc2Uodm9pZCAqdW5pdCk7Cit2b2lkIGRlbF9jb25u
ZWN0aW9uKHZvaWQgKmMpOwogdm9pZCBzbGlwX3N0YXJ0X2ZhaWwodm9pZCAqIGRhdGEpOwpkaWZm
IC11TnIgZGlhbGQtMS4wL2ZpcmV3YWxsLmMgZGlhbGQtMS4wLXZvaWQvZmlyZXdhbGwuYwotLS0g
ZGlhbGQtMS4wL2ZpcmV3YWxsLmMJU2F0IEp1biAxNiAxNTo1MTozOSAyMDAxCisrKyBkaWFsZC0x
LjAtdm9pZC9maXJld2FsbC5jCVNhdCBKYW4gMTIgMTQ6MjU6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DVElPTl9RVUVVRSkK
IAltb25fc3lzbG9nKExPR19ERUJVRywiRGVsZXRpbmcgY29ubmVjdGlvbiAlcCBAICVsZCIsYyx0
aW1lKDApKTsKIApAQCAtMzkwLDkgKzM4OSw5IEBACiAgICAgZnJlZShjKTsKIH0KIAotdm9pZCBk
ZWxfaW1wdWxzZShGV191bml0ICp1bml0KQordm9pZCBkZWxfaW1wdWxzZSh2b2lkICAqdW5pdF92
b2lkKQogewotCisgICAgRldfdW5pdCAqdW5pdCA9IChGV191bml0ICopIHVuaXRfdm9pZDsKICAg
ICBpZiAodW5pdC0+aW1wdWxzZV9tb2RlKSB7CiAJdW5pdC0+aW1wdWxzZV9tb2RlID0gMDsKIAlp
ZiAoaW1wdWxzZV90aW1lID4gMCkgewo=

--_=XFMail.1.5.2.Linux:20020112152313:4293=_
Content-Disposition: attachment; filename="diald-1.0.patch"
Content-Transfer-Encoding: base64
Content-Description: diald-1.0.patch
Content-Type: application/octet-stream; name=diald-1.0.patch; SizeOnDisk=388

ZGlmZiAtdU5yIGRpYWxkLTEuMC9kaWFsZC5oIGRpYWxkLTEuMC1wYXRjaGVkL2RpYWxkLmgKLS0t
IGRpYWxkLTEuMC9kaWFsZC5oCVNhdCBKdW4gMTYgMTI6MDE6MjUgMjAwMQorKysgZGlhbGQtMS4w
LXBhdGNoZWQvZGlhbGQuaAlGcmkgU2VwICA3IDAyOjU3OjU2IDIwMDEKQEAgLTI5LDYgKzI5LDEx
IEBACiAjaW5jbHVkZSA8c2lnbmFsLmg+CiAjaWYgSEFWRV9TWVNfVElNRV9ICiAjICBpbmNsdWRl
IDxzeXMvdGltZS5oPgorI2lmIFRJTUVfV0lUSF9TWVNfVElNRQorIyAgaW5jbHVkZSA8dGltZS5o
PgorI2VuZGlmCisjZWxzZQorIyAgaW5jbHVkZSA8dGltZS5oPgogI2VuZGlmCiAjaWZkZWYgX1BP
U0lYX1BSSU9SSVRZX1NDSEVEVUxJTkcKICMgIGluY2x1ZGUgPHNjaGVkLmg+Cg==

--_=XFMail.1.5.2.Linux:20020112152313:4293=_--
End of MIME message
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--------------070404040102030602000102--