Skip to content

Commit 65ce0cd

Browse files
committed
Modified syscalls.* to fit CPP compilation
1 parent 49b03a0 commit 65ce0cd

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

hardware/tools/libboard_sam3s-ek/include/syscalls.h

+10-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
/*----------------------------------------------------------------------------
3838
* Headers
3939
*----------------------------------------------------------------------------*/
40-
41-
4240
#include <stdio.h>
4341
#include <stdarg.h>
4442
#include <sys/types.h>
@@ -47,10 +45,13 @@
4745
/*----------------------------------------------------------------------------
4846
* Exported functions
4947
*----------------------------------------------------------------------------*/
48+
#ifdef __cplusplus
49+
extern "C" {
50+
#endif
5051

51-
extern caddr_t _sbrk ( int incr ) ;
52+
extern caddr_t _sbrk( int incr ) ;
5253

53-
extern int link( char *old, char *new ) ;
54+
extern int link( char *cOld, char *cNew ) ;
5455

5556
extern int _close( int file ) ;
5657

@@ -63,3 +64,8 @@ extern int _lseek( int file, int ptr, int dir ) ;
6364
extern int _read(int file, char *ptr, int len) ;
6465

6566
extern int _write( int file, char *ptr, int len ) ;
67+
68+
#ifdef __cplusplus
69+
}
70+
#endif
71+

hardware/tools/libboard_sam3s-ek/source/syscalls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern caddr_t _sbrk ( int incr )
7777
return (caddr_t) prev_heap ;
7878
}
7979

80-
extern int link( char *old, char *new )
80+
extern int link( char *cOld, char *cNew )
8181
{
8282
return -1 ;
8383
}

0 commit comments

Comments
 (0)