If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > help - errors compiling db2 userexit program

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-05, 14:42
tmullins tmullins is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
help - errors compiling db2 userexit program

DB2 version 8.1 fixpak 4
Redhat 8 Linux

I'm trying to compile a userexit program (db2uext2.c) and I get the following errors:

db2uext2.c: In function `ArchiveFile':
db2uext2.c:732: `offset_t' undeclared (first use in this function)
db2uext2.c:732: (Each undeclared identifier is reported only once
db2uext2.c:732: for each function it appears in.)
db2uext2.c:732: parse error before "offsetll"
db2uext2.c:804: `offsetll' undeclared (first use in this function)
db2uext2.c:804: parse error before "startingPage"

Line 732:
offset_t offsetll;

Line 804:
offsetll = (offset_t)startingPage * 4096;



Declare for offset_t in the program:

/* HP does not define llseek and offset_t */
#ifdef _INCLUDE_POSIX_SOURCE
# define llseek lseek
typedef unsigned long offset_t;
#endif



Do I comment this out? Delete it altogether?
Reply With Quote
  #2 (permalink)  
Old 09-20-11, 22:17
yellow-fin yellow-fin is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
try this

gcc -D_INCLUDE_POSIX_SOURCE -o db2uext2 db2uext2.c
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On