SQLite3: extract column blob. Impossible to load_extension fileio.c - database

I'm very rookie on SQL and database but my final target is extract all the blob images from a database filed but this is impossible to me. I'm using SQLite and DB Browser for SQLite but I don¡t know how to load the extension.
I have tried to load the fileio.c as extension by the "Load Extension", but Browser only detects .dll and .so.
Ok, I'm trying then to build the fileio.c file by MinGW like this:
C:\Users\juan_>gcc -g -shared ext\misc\fileio.c -o fileio.dll
But then, the compilation doesn't find sqlite3ext.h neither sqlite3.c.
I have downloaded these files from sqlite amalgamation, but now, there is other problem while building:
C:\Users\juan_>gcc -g -shared sqlite-amalgamation-3400100\fileio.c -o fileio.dll
sqlite-amalgamation-3400100\fileio.c:99:30: fatal error: test_windirent.h: No such file or directory
# include "test_windirent.h"
Then, I have found this file in one folder inside sqlite-master (from github, where i could find fileio.c extension).
I add all the amalgamation files in src folder, and retry the building:
sqlite-master\src\fileio.c: In function 'writefileFunc':
sqlite-master\src\fileio.c:513:9: warning: implicit declaration of function 'S_ISLNK' [-Wimplicit-function-declaration]
if( S_ISLNK(mode) ){
^~~~~~~
sqlite-master\src\fileio.c: At top level:
sqlite-master\src\fileio.c:567:3: error: unknown type name 'DIR'
DIR *pDir; /* From opendir() */
^~~
sqlite-master\src\fileio.c: In function 'fsdirResetCursor':
sqlite-master\src\fileio.c:648:22: warning: implicit declaration of function 'closedir' [-Wimplicit-function-declaration]
if( pLvl->pDir ) closedir(pLvl->pDir);
^~~~~~~~
sqlite-master\src\fileio.c: In function 'fsdirNext':
sqlite-master\src\fileio.c:711:18: warning: implicit declaration of function 'opendir' [-Wimplicit-function-declaration]
pLvl->pDir = opendir(pLvl->zDir);
^~~~~~~
sqlite-master\src\fileio.c:711:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pLvl->pDir = opendir(pLvl->zDir);
^
sqlite-master\src\fileio.c:720:29: warning: implicit declaration of function 'readdir' [-Wimplicit-function-declaration]
struct dirent *pEntry = readdir(pLvl->pDir);
^~~~~~~
sqlite-master\src\fileio.c:720:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
sqlite-master\src\fileio.c:722:17: error: dereferencing pointer to incomplete type 'struct DIRENT'
if( pEntry->d_name[0]=='.' ){
^~
Is this not the way to get the fileio.dll extension? I hear other kind of advise like using other program or something like that.

Related

Error no member named 'reqevents'; did you mean 'events' when building Redis on AIX

I'm upgrading from Redis 6.0.13 to 6.2.5 on AIX.
On 6.2.5, the build fails with this error:
MAKE hdr_histogram
cd hdr_histogram && make
make[3]: Entering directory '/home/jenkins/redis/deps/hdr_histogram'
/opt/atc-2.0/opt/gcc/bin/gcc -Wall -Os -g -DLUA_USE_POSIX -DLUA_USE_DLOPEN -include stdint-gcc.h -c hdr_histogram.c
make[3]: Leaving directory '/home/jenkins/redis/deps/hdr_histogram'
make[2]: Leaving directory '/home/jenkins/redis/deps'
CC adlist.o
CC quicklist.o
CC ae.o
In file included from ae.c:60:
ae_select.c: In function 'aeApiResize':
ae_select.c:52:37: warning: unused parameter 'eventLoop' [-Wunused-parameter]
52 | static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
| ~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/poll.h:30,
from ae.c:41:
ae_select.c: In function 'aeApiPoll':
ae_select.c:89:43: error: 'aeEventLoop' has no member named 'reqevents'; did you mean 'events'?
89 | aeFileEvent *fe = &eventLoop->events[j];
| ^~~~~~
ae.c: In function 'aeCreateEventLoop':
ae.c:73:16: error: 'aeEventLoop' has no member named 'reqevents'; did you mean 'events'?
73 | eventLoop->events = zmalloc(sizeof(aeFileEvent)*setsize);
| ^~~~~~
...
I checked the eventLoop struct, and it does indeed contain events, but I see the build failing because it's trying to access reqevents. I can't find reqevents anywhere in the project (with grep -R 'reqevents' .)
This error only happens on AIX 7.1 - Linux and macOS both work fine.
Do you know why req would be prepended to the struct members on AIX, and how I might solve the error?

gcc4.9, disable include files trace, from warnings

I just moved to gcc4.9 . Now when I run make to compile my program, I noticed the verbosity of messages is much increased. In particular in the warnings, I receive a lot more of info I don't need, mainly such messages:
myfile.c: In function 'myfunc':
myfile.c:4677:10: warning: passing argument 1 of 'sprintf' from incompatible pointer type
sprintf(str1,"file.txt");
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from myfile.c:28:
/usr/include/i386-linux-gnu/bits/stdio2.h:31:1: note: expected 'char * __restrict__' but argument is of type 'char **'
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
My compilation parameters are always the same "-g -O3".
I tried -g0 and -g1, but verbosity doesn't lower.
So wanted to ask, how can I set gcc to suppress all those excessive compile-time messages in the warnings, everything starting from "In file included..." and after?
EDIT:
I guess I have to elaborate more what I want to achieve.
I want the warnings, so I don't need -w option.
I do want to see:
myfile.c: In function 'myfunc':
myfile.c:4677:10: warning: passing argument 1 of 'sprintf' from incompatible pointer type
sprintf(str1,"file.txt");
^
I do NOT want to see:
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from myfile.c:28:
/usr/include/i386-linux-gnu/bits/stdio2.h:31:1: note: expected 'char * __restrict__' but argument is of type 'char **'
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
I'm not interested that primitive sprintf is declared in a,called by b (...who actually could be interested in that...?!?)
The previous gcc version didn't have that issue, so my best guess, there must be some new option in gcc4.9 to remove that (but I couldn't find it)
Does anybody know how to remove everything starting from "In file included..." further(in the warning)?
Thanks
I strongly recommend you don't do this, but if you insist:
gcc -w inhibits all warnings. This is something you could have discovered from googling 'gcc suppress warnings'. . .
That said, the warnings are valid - you appear to be doing wrong things in your code. If you want to get rid of the warnings, why not fix the code? Then you have better code and no warnings.
What you suggest is a workaround, but I can still try it. Could you please write here that filter you talk about?
OK; I'd create a shell script to do the hard work. There are two ways to handle it. One is to call the script gcc-filter and then instead of running:
gcc -g -O3 -Wall -Wextra -Werror -I/where/ever -c source.c
you would run:
gcc-filter gcc -g -O3 -Wall -Wextra -Werror -I/where/ever -c source.c
Using make, you can achieve that by specifying CC="gcc-filter gcc" or equivalent.
The alternative is to run the script after redirecting output:
gcc -g -O3 -Wall -Wextra -Werror -I/where/ever -c source.c 2>&1 | gcc-filter
I'm going to assume the first technique.
gcc-filter.sh
"$#" 2>&1 |
sed '/^In file /,/^ *^/d' >&2
The first line runs gcc (or whatever command is specified by the arguments; it doesn't have to be gcc) with the arguments as specified on the command line. It redirects both standard output and standard error to a pipe (I'll come back to this), which goes to sed.
The sed line looks for the pattern In file at the start of a line, and deletes from there up to the first line that starts with a caret after optional spaces. The redirection sends the information that it passes through to standard error.
There are two prime defects with the script as it stands:
It assumes that standard output and standard error can be merged (or, more succinctly, that gcc doesn't write much to standard output).
It works off one pattern of error reporting. If there are other sequences that should be filtered, you will need to add to the sed script.
You can deal with the standard output vs standard error issue, but it is mildly mind blowing (maybe 'mind puffing').
(
"$#" 2>&1 1>&3 |
sed '/^In file /,/^ *^/d' >&2
) 3>&1
The sub-shell ( ... ) 3>&1 sends data written to file descriptor 3 so it goes to standard output.
Inside the sub-shell 2>&1 1>&3 | arranges for:
Standard output to go to the pipe.
Standard error to go where standard output is going (the pipe).
Standard output to go to file descriptor 3 (without changing where standard error is going, the pipe).
The sed command therefore gets the standard error output from gcc as its standard input, filters it, and the >&2 sends its standard output to standard error.
The net result is that standard error is filtered while standard output is not. However, be aware that you can end up with different interleaving of output from the two streams as a result of the buffering going on.
One other problem: exit status. The exit status of the script as written is the exit status of the sed command, which will be 0 under most circumstances. If we need to relay the exit status from gcc, we have to work with the Bash set -o pipefail, I think. Or you can poke at the PIPESTATUS array; exit ${PIPESTATUS[0]} should exit with the same exit status that gcc exited with.
Demonstrating the code working on Linux
The system is running an Ubuntu 14.04 LTS derivative with GCC 4.9.2.
Test code b.c
(I'd used up x.c, y.c, z.c, and a.c on other programs.)
#include <stdio.h>
int main(void)
{
char array[512];
char *buffer = array;
sprintf(&buffer, "file.txt");
printf("%s\n", buffer);
return 0;
}
Compilation without gcc-filter.sh:
$ make b.o WFLAG3= WFLAG4= WFLAG5= WFLAG6= IFLAGS= LDFLAGS= LDLIBS= cc -g -O3 -std=c11 -Wall -Wextra -Werror -c -o b.o b.c
b.c: In function ‘main’:
b.c:8:3: error: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Werror]
sprintf(&buffer, "file.txt");
^
In file included from /usr/include/features.h:374:0,
from /usr/include/stdio.h:27,
from b.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:31:1: note: expected ‘char * restrict’ but argument is of type ‘char **’
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
^
cc1: all warnings being treated as errors
<builtin>: recipe for target 'b.o' failed
make: *** [b.o] Error 1
$
Compilation with gcc-filter.sh
$ make b.o CC="./gcc-filter.sh gcc"
./gcc-filter.sh gcc -g -O3 -std=c11 -Wall -Wextra -Werror -c -o b.o b.c
b.c: In function ‘main’:
b.c:8:11: error: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Werror]
sprintf(&buffer, "file.txt");
^
cc1: all warnings being treated as errors
<builtin>: recipe for target 'b.o' failed
make: *** [b.o] Error 1
$
gcc-filter.sh
#!/bin/bash
set -o pipefail
(
"$#" 2>&1 1>&3 |
sed '/^In file /,/^ *^/d' >&2
) 3>&1
exit ${PIPESTATUS[0]}
And another test
I also created c.c which contained three sprintf() lines and three printf() lines, and the filtered output was:
$ ./gcc-filter.sh gcc -g -O3 -std=c11 -Wall -Wextra -Werror -c c.c
c.c: In function ‘main’:
c.c:8:11: error: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Werror]
sprintf(&buffer, "file1.txt");
^
c.c:10:11: error: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Werror]
sprintf(&buffer, "file2.txt");
^
c.c:12:11: error: passing argument 1 of ‘sprintf’ from incompatible pointer type [-Werror]
sprintf(&buffer, "file3.txt");
^
cc1: all warnings being treated as errors
$
So multiple errors are handled properly (but in times past, more than one similar script has appeared to work on a single instance of an error message but when tested on multiple error messages, it was too enthusiastic about discarding output).

Makefile and program structure Raspberry Pi GCC

I' m trying to setup a simple tool to measure different aspects of a system. I build a project which can log an accelerometer, gyroscope and a magnetometer. I want full control of the the program so I decided not to use any usr/local kind of libraries and keep all files in the project folder. All files all working. I want to make the structure of my program as follows: https://www.dropbox.com/s/59s3si8spvkdq98/filestructure.png (not enough REP). I don't have much experience in making Makefiles, except changing a few variables. I work in the Embedded environment and mostly with IDE's.
I tried building my project with the following Makefile:
# Project name
NAME = TEST
# Tools
CC = gcc
CFLAGS = -o
# Paths
DRV_PATH = drivers
SRC_PATH = src
LIB_PATH = libs
# includes
INCLUDES = -I $(DRV_PATH) -I $(LIB_PATH) -I $(SRC_PATH)
# what files do we need to compile?
# libraries
MY_LIB = $(LIB_PATH)/bcm2835.c
# main files
MAIN = main.c
# src files
#MY_SRC = $(SRC_PATH)/vector.c
MY_SRC += $(SRC_PATH)/dcm.c
# select drivers to compile
DRV_SRC = $(DRV_PATH)/adxl345.c
DRV_SRC += $(DRV_PATH)/itg3200.c
DRV_SRC += $(DRV_PATH)/hmc5883l.c
DRV_SRC += $(DRV_PATH)/gy-85.c
DRV_SRC += $(DRV_PATH)/nrf24l01.c
# bundle files
ALL_SRC = $(MY_LIB) $(DRV_SRC) $(MY_SRC) $(MAIN)
OBJ = $(ALL:.c=.o)
BIN = $(ALL:.c=)
# make commands
all:
$(CC) $(CFLAGS) $(NAME) $(ALL_SRC)
debug:
$(CC) $(CFLAGS) $(NAME) $(ALL_SRC) -DDEBUG=1
imudebug:
$(CC) $(CFLAGS) $(NAME) $(ALL_SRC) -DIMUDEBUG=1
nrfdebug:
$(CC) $(CFLAGS) $(NAME) $(ALL_SRC) -DNRFDEBUG=1
I use the different make commands to generate some debug output.
The config file currently includes all files and is as follows:
#ifndef CONFIG_H
#define CONFIG_H
/* includes */
#include <stdio.h>
#include <math.h>
/* libs */
#include <bcm2835.h>
/* drivers */
#include "gy-85.h"
#include "adxl345.h"
#include "itg3200.h"
#include "hmcl5883l.h"
#include "nrf24l01.h"
/* src */
#include "dcm.h"
#endif // __CONFIG_H__
And the dcm.h file looks as follows. I tried t keep all .h files like this:
#ifndef DCM_H
#define DCM_H
#include <bcm2835.h>
#include <stdio.h>
#include <math.h>
#include "gy-85.h"
double pitch, roll, yaw;
double DCM_Matrix[3][3];
uint64_t stamp;
void resetFusion(void);
#endif
This is my make result:
gcc -o TEST libs/bcm2835.c drivers/adxl345.c drivers/itg3200.c drivers/hmc5883l.c drivers/gy-85.c drivers/nrf24l01.c src/dcm.c main.c
In file included from drivers/adxl345.c:1:0:
drivers/adxl345.h:4:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
In file included from drivers/itg3200.c:1:0:
drivers/itg3200.h:4:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
drivers/hmc5883l.c: In function ‘magInit’:
drivers/hmc5883l.c:7:30: error: ‘MAG_ADDR’ undeclared (first use in this function)
drivers/hmc5883l.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/hmc5883l.c:14:17: error: ‘MODE’ undeclared (first use in this function)
drivers/hmc5883l.c:14:23: error: ‘CONTINUOUS’ undeclared (first use in this function)
drivers/hmc5883l.c:22:17: error: ‘CONA’ undeclared (first use in this function)
drivers/hmc5883l.c:22:23: error: ‘RATE_50HZ’ undeclared (first use in this function)
drivers/hmc5883l.c: In function ‘magRead’:
drivers/hmc5883l.c:37:30: error: ‘MAG_ADDR’ undeclared (first use in this function)
drivers/hmc5883l.c:38:18: error: ‘DATA’ undeclared (first use in this function)
drivers/hmc5883l.c: In function ‘magGetRegister’:
drivers/hmc5883l.c:60:13: error: ‘BCM2835_I2C_REASON_OK’ undeclared (first use in this function)
drivers/hmc5883l.c:61:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
drivers/hmc5883l.c: At top level:
drivers/hmc5883l.c:71:6: warning: conflicting types for ‘magGetRegisters’ [enabled by default]
drivers/hmc5883l.c:38:2: note: previous implicit declaration of ‘magGetRegisters’ was here
drivers/hmc5883l.c: In function ‘magGetRegisters’:
drivers/hmc5883l.c:79:13: error: ‘BCM2835_I2C_REASON_OK’ undeclared (first use in this function)
drivers/hmc5883l.c:80:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
drivers/hmc5883l.c: At top level:
drivers/hmc5883l.c:97:6: warning: conflicting types for ‘magSetRegister’ [enabled by default]
drivers/hmc5883l.c:14:2: note: previous implicit declaration of ‘magSetRegister’ was here
drivers/hmc5883l.c: In function ‘magSetRegister’:
drivers/hmc5883l.c:107:13: error: ‘BCM2835_I2C_REASON_OK’ undeclared (first use in this function)
drivers/hmc5883l.c:108:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
drivers/gy-85.c: In function ‘gyInit’:
drivers/gy-85.c:15:30: error: ‘BCM2835_I2C_CLOCK_DIVIDER_2500’ undeclared (first use in this function)
drivers/gy-85.c:15:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/gy-85.c: In function ‘gyUpdate’:
drivers/gy-85.c:29:2: error: unknown type name ‘int16_t’
drivers/gy-85.c:30:2: error: unknown type name ‘uint8_t’
drivers/gy-85.c:32:9: error: ‘int16_t’ undeclared (first use in this function)
drivers/gy-85.c:32:18: error: expected expression before ‘)’ token
drivers/gy-85.c:40:18: error: expected expression before ‘)’ token
drivers/gy-85.c:47:18: error: expected expression before ‘)’ token
drivers/gy-85.c:61:2: warning: return from incompatible pointer type [enabled by default]
In file included from drivers/nrf24l01.c:1:0:
drivers/nrf24l01.h:5:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
In file included from src/dcm.c:1:0:
src/dcm.h:4:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
In file included from main.c:1:0:
config.h:9:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
make: *** [all] Error 1
If you can point out the main problem with my file structure I would be so glad!
Current error list:
gcc -o TEST -I libs -I drivers -I src libs/bcm2835.c drivers/adxl345.c drivers/itg3200.c drivers/hmc5883l.c drivers/gy-85.c drivers/nrf24l01.c src/dcm.c main.c
drivers/gy-85.c: In function ‘gyUpdate’:
drivers/gy-85.c:63:2: warning: return from incompatible pointer type [enabled by default]
main.c: In function ‘main’:
main.c:51:4: warning: passing argument 1 of ‘nrf24Transmit’ from incompatible pointer type [enabled by default]
drivers/nrf24l01.h:145:9: note: expected ‘uint8_t *’ but argument is of type ‘uint64_t *’
/tmp/ccOWR401.o:(.bss+0x0): multiple definition of `accelRaw'
/tmp/cc1gy1Bh.o:(.bss+0x0): first defined here
/tmp/ccOWR401.o:(.bss+0x8): multiple definition of `accelBias'
/tmp/cc1gy1Bh.o:(.bss+0x8): first defined here
/tmp/ccyZlhJe.o:(.bss+0x0): multiple definition of `accelRaw'
/tmp/cc1gy1Bh.o:(.bss+0x0): first defined here
/tmp/ccyZlhJe.o:(.bss+0x8): multiple definition of `accelBias'
/tmp/cc1gy1Bh.o:(.bss+0x8): first defined here
/tmp/ccUbOIyA.o:(.bss+0x0): multiple definition of `accelRaw'
/tmp/cc1gy1Bh.o:(.bss+0x0): first defined here
/tmp/ccUbOIyA.o:(.bss+0x8): multiple definition of `accelBias'
/tmp/cc1gy1Bh.o:(.bss+0x8): first defined here
/tmp/ccyZlhJe.o: In function `resetFusion':
dcm.c:(.text+0x38): undefined reference to `atan2'
collect2: ld returned 1 exit status
make: *** [all] Error 1
You don't have your includes in your rule
INCLUDES = -I $(DRV_PATH) -I $(LIB_PATH) -I $(SRC_PATH)
This just seems to dangle. Simplest solution to my eyes is to move down your CFLAGS definition and add in the includes:
INCLUDES = -I $(DRV_PATH) -I $(LIB_PATH) -I $(SRC_PATH)
CFLAGS = -o $(INCLUDES)
This way you don't have to change anything else. Of course, there are alternatives, this one just looks easiest.

GCC does not throw an error during the compiler stage when a function has not been forward declared

Ok,
I have 3 files in my directory.
main.c
#include <stdio.h>
int main(int a, int b, int c)
{
aprint();
bprint();
}
a.c
#include <stdio.h>
void aprint()
{
printf("hey This is a.c");
}
b.c
#include <stdio.h>
void bprint()
{
printf("This is b.c");
}
I haven't created any header files.
I just compiled using "gcc main.c a.c b.c"
I didn't get any error. I want to know what happened?
Did gcc just assume everything is going to be okay in linking stages and why didn't gcc throw an error during compilation?
Enable warnings using -Wall flag, hten you will see warning: Implicit call to function bprint() and Implicit call to function aprint(). It's is basically compiler recognizes this function during Linker stage and this does not give any error.
C89/90 version of C language does not require functions to be forward declared. C99 version of C language does require functions to be forward declared. Are you compiling your code in C89/90 mode or in C99 mode?
Note that even in C99 mode a genuine error (i.e. a constraint violation) might be reported by the compiler as a mere warning. If you want GCC to become more strict in reporting constraint violations as errors, run it with -pedantic-errors switch.
I brought you your warnings:
notroot#ubuntu:~/qweqwe$ gcc main.c a.c b.c -Wall
main.c:2:5: warning: second argument of ‘main’ should be ‘char **’ [-Wmain]
main.c:2:5: warning: third argument of ‘main’ should probably be ‘char **’ [-Wmain]
main.c: In function ‘main’:
main.c:4:1: warning: implicit declaration of function ‘aprint’ [-Wimplicit-function-declaration]
main.c:5:1: warning: implicit declaration of function ‘bprint’ [-Wimplicit-function-declaration]
main.c:6:1: warning: control reaches end of non-void function [-Wreturn-type]

Problem building project in Eclipse

While building a project in Eclipse I got the following output:
make all
Building file: ../Source/gettimeofday.c
Invoking: GCC C Compiler
gcc -I"/root/Desktop/Eclipse/openwsman/Header" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -
MF"Source/gettimeofday.d" -MT"Source/gettimeofday.d" -o"Source/gettimeofday.o" "../Source/gettimeofday.c"
../Source/gettimeofday.c:38: warning: ‘struct timezone’ declared inside parameter list
../Source/gettimeofday.c:38: warning: its scope is only this definition or declaration, which is probably not
what you want
../Source/gettimeofday.c: In function ‘gettimeofday’:
../Source/gettimeofday.c:41: error: dereferencing pointer to incomplete type
../Source/gettimeofday.c:41: error: dereferencing pointer to incomplete type
make: *** [Source/gettimeofday.o] Error 1
The problematic line is:
int gettimeofday(struct timeval *tv, struct timezone *tzp)
This function is declared in the header file.
Can you help me?
GCC complains that struct timezone is undeclared. A few lines down in the file it complains about dereferencing a pointer to an incomplete type. I suspect that gettimeofday.c:41 uses the tzp argument. Did you include a declaration for struct timezone? On my system, it is declared in /usr/include/linux/time.h.

Resources