rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
		
							parent
							
								
									7cd5da7eef
								
							
						
					
					
						commit
						4e45deedf5
					
				@ -201,6 +201,10 @@ static void set_year_20xx(void)
 | 
				
			|||||||
    g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
 | 
					    g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
 | 
				
			||||||
    g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
 | 
					    g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (sizeof(time_t) == 4) {
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Set a date in 2080 to ensure there is no year-2038 overflow.  */
 | 
					    /* Set a date in 2080 to ensure there is no year-2038 overflow.  */
 | 
				
			||||||
    cmos_write(RTC_REG_A, 0x76);
 | 
					    cmos_write(RTC_REG_A, 0x76);
 | 
				
			||||||
    cmos_write(RTC_YEAR, 0x80);
 | 
					    cmos_write(RTC_YEAR, 0x80);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user