fail to compile 'fortune'

fail to compile 'fortune'

Post by Hsien-Tang Su » Sun, 17 Aug 1997 04:00:00


  I downloaded the source codes of 'fortune' from sunsite
  and tried to compile it but got error messages, can
  someone point me to a site which has the executable
  fortune program ?

  Thanks a million

  H.T. Sun


1. compiling older version of 'fortune' with gcc2.7.2.1: problem in dirent.h

Hello all

I have recently tried to compile the 'fortune' program from sunsite.
When I try to compile it on a pentium running linux 2.0.29 and gcc, I get the following message:

fortune.c: In function `add_dir':
fortune.c:702: structure has no member named `d_namlen'
fortune.c:704: structure has no member named `d_namlen'

In fortune.c, the offending lines both make reference to
dirent->d_namlen, where 'dirent' is declared as 'register struct dirent

When I look at the included file dirent.h, I find that d_namlen is
included if __USE_GCC is #defined, and I have seen that d_namlen is part
of the structure of dirent.h in the GNU C Library reference manual.

What am I doing wrong here?  Am I invoking gcc in a way that it is not
assuming gnu compatibility?  Is there somewhere in the code that I
should #define __USE_GCC?

If you respond to me personally, please be aware of the spam-baffles in
my address.
// Dr. Paul Box
// Dept of Geography and Earth Resources
// UMC 5240
// Utah State University
// Logan, UT  84321           Phone: 801-797-2546

*  If Elvis was so great, why was he buried in the back yard like a
*  hamster?

2. DefragFS/ReorgVG

3. Novice: Compiling Qt with Mesa fails: undefined reference to 'atexit'?

4. Loopback-mail......

5. Compiling latest Jakarta 4.0.1 fails with 'not found in import'

6. HELP: Ftape always busy after first use

7. Compiling latest Jakarta 4.0.1 fails with 'not found in import' ...

8. Q .nsconfig & dbm formats - Commerce 1.12 - UNIX?

9. Using the 'fortune' command with own data file

10. OT: That 'fortune' sure is funny ...

11. Question about 'fortune'

12. fortune's .dat files' format

13. How to make 'fortune' databases.