Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th March 2007, 19:32
full_adder full_adder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with gettimeofday function

Hi

undefined reference to `gettimeofday'

the above error msg. appeared when I made : (make install) where I have changed in do_softirq function in softirq.c to compute the elapsed time, the main statements are:

struct timeval t1, t2;
...
gettimeofday(&t1, (void *)0); // alse gettimeofday(&t1, NULL) the same output
..

may be the reason is that I omitted #include<sys/time.h> and <stdio.h>, but when I added them with the default include statements, it gave me another erorr:

linux/stdio.h: No such file or directory
sys/time.h: No such file or directory

where that file contains the following include statements:

#include <linux/module.h>
#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/notifier.h>
#include <linux/percpu.h>
#include <linux/cpu.h>
#include <linux/kthread.h>
#include <linux/rcupdate.h>
#include <asm/irq.h>


thanks for any help.
Reply With Quote
Sponsored Links
  #2  
Old 12th March 2007, 13:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by full_adder
linux/stdio.h: No such file or directory
sys/time.h: No such file or directory
If you're on Debian or Ubuntu, you can try to install the missing packages like this: http://www.howtoforge.com/apt_file_debian_ubuntu
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 16th March 2007, 16:01
full_adder full_adder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I used do_gettimeofday() rathar than gettimeofday() like this:

do_gettimeofday(&t1); //with one param.

and it has worked well.
thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
installing Perl module GD - ran into problems Ovidiu Installation/Configuration 6 19th September 2006 09:32
Postfix+MySQL Problem jasutton Installation/Configuration 1 15th June 2006 16:06
Frustrated with ISPConfig install! woozyerdaddee Installation/Configuration 4 19th May 2006 03:38


All times are GMT +2. The time now is 01:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.