Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 1999 23:01:56 +0100 (CET)
From:      patrik@astrom.net
To:        freebsd-hackers@freebsd.org
Subject:   Error compiling.. (Again, forgot the attachment)
Message-ID:  <Pine.BSF.4.10.9911282300440.56372-200000@styx.astrom.net>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1007746717-943826516=:56372
Content-Type: TEXT/PLAIN; charset=US-ASCII

Sorry for the double posting...

Regards
Patrik Astrom


---------- Forwarded message ----------
Date: Sun, 28 Nov 1999 22:59:29 +0100 (CET)
From: patrik@astrom.net
To: freebsd-hackers@freebsd.org
Subject: Error compiling..

Hi everyone...

First of all I would like to state that IM not a programmer.

Im trying to compile a program and IM getting a errormessage, I have
included the error message bellow.

viking# cc emsg1.c 
emsg1.c: In function `main':
emsg1.c:197: warning: passing arg 2 of `connect' from incompatible pointer
type
/var/tmp/ccRu22801.o: In function `main':
/var/tmp/ccRu22801.o(.text+0x5bb): undefined reference to `cuserid'
viking#

The software IM trying to compile is a network monitoring tool named
"EMU", I've found it at "http://www.jarrix.com.au".

At line 197 it looks like this...

if( connect(s, &sin, sizeof(sin)) < 0) {
                        close(s);
                        sleep(rand[count]);
                        count++;
                }
                else { 
                        send(s, msg, strlen(msg), 0);
                        if(q_option) { 
                                fp = fdopen(s, "r"); 
                                while ((c = fgetc(fp)) != EOF) {
                                        putchar(c);
                                }
                                close(s);
                                exit(0);
                        }
                        close(s);
                        exit(0);
                }


And where it complains about the "cuserid" bit it looks like this...

/* get my user name */
        if (u_flag == 0) {
                cuserid(myuser);
        } 

As stated above IM not a programmer and I would be most grateful for any
hints or suggestions.

Im attaching the emsg1.c file to if someone should get intressted.

Regards 
Patrik Astrom


--0-1007746717-943826516=:56372
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="emsg1.c"
Content-Transfer-Encoding: BASE64
Content-ID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nID0gMTsNCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3J0ID0gYXRvaShvcHRh
cmcpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0K
ICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd0JyAgICAgICAgOg0KCQkJ
CQkJdF9mbGFnID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBzdHJjcHkodHRsLG9wdGFyZyk7DQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgIGNhc2Ug
J3cnICAgICAgICA6DQoJCQkJCQl3X2ZsYWcgPSAxOw0KICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIHN0cmNweShwYXNzd29yZCxvcHRhcmcpOw0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAg
ICAgICAgICAgICAgICAgICBjYXNlICdtJyAgICAgICAgOg0KCQkJCQkJbV9m
bGFnID0gMTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJj
cHkobWVzc2FnZSxvcHRhcmcpOw0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdz
JyAgICAgICAgOg0KCQkJCQkJc19mbGFnID0gMTsNCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBzdHJjcHkoc2V2ZXJpdHksb3B0YXJnKTsNCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAg
ICAgICAgICAgICAgICAgY2FzZSAnYycgICAgICAgIDoNCgkJCQkJCWNfZmxh
ZyA9IDE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyY3B5
KGNsYXNzLG9wdGFyZyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgYnJlYWs7DQogICAgICAgICAgIC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Btc2csIHN0cmxlbihtc2cpLCAw
KTsNCgkJCWlmKHFfb3B0aW9uKSB7DQoJCQkJZnAgPSBmZG9wZW4ocywgInIi
KTsNCgkJCQl3aGlsZSAoKGMgPSBmZ2V0YyhmcCkpICE9IEVPRikgew0KCQkJ
CQlwdXRjaGFyKGMpOw0KCQkJCX0NCgkJCQljbG9zZShzKTsNCgkJCQlleGl0
KDApOw0KCQkJfQ0KCQkJY2xvc2Uocyk7DQoJCQlleGl0KDApOw0KCQl9DQoJ
CS8qIGNsb3NlKHMpOyAqLw0KCX0NCglleGl0KDEpOw0KfQ0KDQpzeW50YXgo
KQ0Kew0KCXB1dHMoIkNvcHlyaWdodCAoQykgMTk5OSBKYXJyaXggU3lzdGVt
cyB2MS4xIik7DQoJcHV0cygiICIpOw0KCXB1dHMoImVtc2cxIFstaCA8aG9z
dG5hbWU+XSBbLXUgPHVzZXI+XSBbLW8gPG5vcm1hbHxzbGVlcHxtYXNrfGNv
dW50fGV2ZW50Pl0gLW48aG9zdD4gLXA8cG9ydD4gLXQ8dGltZS10by1saXZl
PiAtczxzZXZlcml0eT4gLXc8cGFzc3dvcmQ+IC1jIDxjbGFzcz4gLW08bWVz
c2FnZT5cbiIpOw0KCXB1dHMoImVtc2cxIFstaCA8aG9zdG5hbWU+XSBbLXUg
PHVzZXI+XSBbLW8gPHdha2V1cHxxdWVyeXxjb21tZW50fGRlbGV0ZXxzdXNw
ZW5kPl0gLW48aG9zdD4gLXA8cG9ydD4gIC13PHBhc3N3b3JkPiAgLW08aG9z
dG5hbWU6b2JqZWN0IC4uLi4uLi4uPlxuIik7DQp9DQo=
--0-1007746717-943826516=:56372--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911282300440.56372-200000>