diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/forte/forte-0.3.5 | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/forte/forte-0.3.5')
3 files changed, 90 insertions, 0 deletions
diff --git a/recipes/forte/forte-0.3.5/forte-0.3.5_socket_reuse.patch b/recipes/forte/forte-0.3.5/forte-0.3.5_socket_reuse.patch new file mode 100644 index 0000000000..a3dcd10917 --- /dev/null +++ b/recipes/forte/forte-0.3.5/forte-0.3.5_socket_reuse.patch @@ -0,0 +1,20 @@ +diff -Naur FORTE-0.3.5.orig/src/arch/pc/pcsochan.cpp FORTE-0.3.5/src/arch/pc/pcsochan.cpp +--- FORTE-0.3.5.orig/src/arch/pc/pcsochan.cpp 2009-01-13 16:17:18.000000000 +0000 ++++ FORTE-0.3.5/src/arch/pc/pcsochan.cpp 2009-02-16 10:08:53.000000000 +0000 +@@ -128,6 +128,16 @@ + }
+ // switch between client/server:
+ if (pa_stConnectionInformation.m_enServiceType == e_Server) {
++ unsigned int opt = 1;
++
++ if (setsockopt(sock_id, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) != 0)
++ {
++ char acError[80] = { "TCP-Socket setsockopt() failed: " };
++ strcat(acError, strerror(errno));
++ DEVLOG_ERROR(cg_nID_CSocketHandler, 0x10, acError);
++ return -1;
++ }
++
+ sock_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ if (bind(sock_id, (struct sockaddr *)&sock_addr, sizeof(struct sockaddr)) != 0) {
+ DEVLOG_ERROR_2(cg_nID_CSocketHandler, 0x02, "TCP-Socket bind() failed: %s", strerror(errno) );
diff --git a/recipes/forte/forte-0.3.5/forte-0.3.5_stdlib_inc_fix.patch b/recipes/forte/forte-0.3.5/forte-0.3.5_stdlib_inc_fix.patch new file mode 100644 index 0000000000..3ebd47325a --- /dev/null +++ b/recipes/forte/forte-0.3.5/forte-0.3.5_stdlib_inc_fix.patch @@ -0,0 +1,22 @@ +diff -Naur FORTE-0.3.5.orig/src/core/datatypes/forte_lreal.cpp FORTE-0.3.5/src/core/datatypes/forte_lreal.cpp +--- FORTE-0.3.5.orig/src/core/datatypes/forte_lreal.cpp 2008-12-11 16:05:26.000000000 +0000 ++++ FORTE-0.3.5/src/core/datatypes/forte_lreal.cpp 2009-02-16 11:01:44.000000000 +0000 +@@ -8,6 +8,7 @@ + * Contributors:
+ * <date>: <author>, <author email> - changes
+ *******************************************************************************/
++#include <stdlib.h>
+ #include <math.h>
+ #include "forte_lreal.h"
+
+diff -Naur FORTE-0.3.5.orig/src/core/datatypes/forte_real.cpp FORTE-0.3.5/src/core/datatypes/forte_real.cpp +--- FORTE-0.3.5.orig/src/core/datatypes/forte_real.cpp 2008-12-11 16:05:40.000000000 +0000 ++++ FORTE-0.3.5/src/core/datatypes/forte_real.cpp 2009-02-16 11:12:16.000000000 +0000 +@@ -8,6 +8,7 @@ + * Contributors:
+ * <date>: <author>, <author email> - changes
+ *******************************************************************************/
++#include <stdlib.h>
+ #include <math.h>
+ #include "forte_real.h"
+
diff --git a/recipes/forte/forte-0.3.5/forte-0.3.5_timer.patch b/recipes/forte/forte-0.3.5/forte-0.3.5_timer.patch new file mode 100644 index 0000000000..2064cda581 --- /dev/null +++ b/recipes/forte/forte-0.3.5/forte-0.3.5_timer.patch @@ -0,0 +1,48 @@ +diff -Naur FORTE-0.3.5.orig/src/arch/pc/pctimeha.cpp FORTE-0.3.5/src/arch/pc/pctimeha.cpp +--- FORTE-0.3.5.orig/src/arch/pc/pctimeha.cpp 2009-01-13 16:17:18.000000000 +0000 ++++ FORTE-0.3.5/src/arch/pc/pctimeha.cpp 2009-02-16 10:16:37.000000000 +0000 +@@ -11,6 +11,7 @@ + #include "pctimeha.h"
+ #include "../../core/devexec.h"
+ #include <time.h>
++#include <sys/time.h>
+
+ const TINT32 CPCTimerHandler::csm_nTicksPerSecond = 1000;
+
+@@ -28,14 +29,34 @@ + disableHandler();
+ }
+
++static inline unsigned long long GetTicks(struct timeval* stTmVal, TINT32 ticksPerSecond)
++{
++ unsigned long long ret = stTmVal->tv_sec * 1000LL;// sec -> ms
++ ret += stTmVal->tv_usec/1000;// + us -> ms
++ ret /= 1000/ticksPerSecond; // ms -> ticks
++ return ret;
++}
++
+ bool CPCTimerHandler::run(){
+ struct timespec stReq;
++ struct timeval stTmNow;
++ unsigned long long tickStart;
++ unsigned long long tickNow;
++ unsigned long long tickCalled = 0;
+ stReq.tv_sec = 0;
+- stReq.tv_nsec = 1000000 / (csm_nTicksPerSecond / 1000);
++ stReq.tv_nsec = 1000000000 / (csm_nTicksPerSecond);
++
++ gettimeofday(&stTmNow, NULL);
++ tickNow = tickStart = GetTicks(&stTmNow, csm_nTicksPerSecond);
+
+ while(m_bAlive){
+- nanosleep(&stReq, NULL);
++ if( (tickNow-tickStart) <= (tickCalled+1) ) {
++ nanosleep(&stReq, NULL);
++ }
+ nextTick();
++ ++tickCalled;
++ gettimeofday(&stTmNow, NULL);
++ tickNow = GetTicks(&stTmNow, csm_nTicksPerSecond);
+ }
+ return true;
+ }
|