File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ void rt_floppy_init(void)
357357 device -> read = rt_floppy_read ;
358358 device -> write = rt_floppy_write ;
359359 device -> control = rt_floppy_control ;
360- device -> user_data = NULL ;
360+ device -> user_data = RT_NULL ;
361361
362362 rt_device_register (device , "floppy" ,
363363 RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_REMOVABLE | RT_DEVICE_FLAG_STANDALONE );
Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ RTM_EXPORT(close);
110110 * @return the actual read data buffer length. If the returned value is 0, it
111111 * may be reach the end of file, please check errno.
112112 */
113+ #ifdef _READ_WRITE_RETURN_TYPE
114+ _READ_WRITE_RETURN_TYPE read (int fd , void * buf , size_t len ) /* some gcc tool chains will use different data structure */
115+ #else
113116ssize_t read (int fd , void * buf , size_t len )
117+ #endif
114118{
115119 int result ;
116120 struct dfs_fd * d ;
@@ -150,7 +154,11 @@ RTM_EXPORT(read);
150154 *
151155 * @return the actual written data buffer length.
152156 */
157+ #ifdef _READ_WRITE_RETURN_TYPE
158+ _READ_WRITE_RETURN_TYPE write (int fd , const void * buf , size_t len ) /* some gcc tool chains will use different data structure */
159+ #else
153160ssize_t write (int fd , const void * buf , size_t len )
161+ #endif
154162{
155163 int result ;
156164 struct dfs_fd * d ;
You can’t perform that action at this time.
0 commit comments