summaryrefslogtreecommitdiff
path: root/devel/bullet/patches/patch-aa
blob: 4ec436a58fa514deb37d3ce93c9a346f97794a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-aa,v 1.1.1.1 2010/09/03 23:01:47 wiz Exp $

Avoid using obsolete functions.

--- Extras/glui/glui_list.cpp.orig	2008-05-10 18:00:21.000000000 +0000
+++ Extras/glui/glui_list.cpp
@@ -20,7 +20,7 @@
 
 #include "glui_internal_control.h"
 #include <cmath>
-#include <sys/timeb.h>
+#include <sys/time.h>
 
 /****************************** GLUI_List::GLUI_List() **********/
 
@@ -90,9 +90,9 @@ int    GLUI_List::mouse_down_handler( in
 {
   int tmp_line;
   unsigned long int ms;
-  timeb time;
-  ftime(&time);
-  ms = time.millitm + (time.time)*1000;
+  struct timeval now;
+  gettimeofday(&now, NULL);
+  ms = now.tv_usec/1000 + now.tv_sec*1000;
 
   tmp_line = find_line( local_x-x_abs, local_y-y_abs-5 );  
   if ( tmp_line == -1 ) {